Comet Downloader module#
- class comet_downloader.DownloadCometData#
Bases:
object
Downloads the data from Comet experiments
- download_assets(experiment: APIExperiment, task: str, seed: str, filter_strategy_name: str | None = '') None #
Downloads and saves the assets of an experiment, filtering out unnecessary files.
- Parameters
- experimentcomet.APIExperiment
A Comet APIExperiment object containing the experiment data.
- taskstr
The task name associated with the experiment.
- seedstr
The seed value associated with the experiment.
- filter_strategy_namestr, optional, default: “”
The filter strategy name, if applicable.
- Returns
None
- download_workspace_data(task_name: str, filter_strategies_used: bool | None = False) None #
Loads experiment data for a specific project from the Comet workspace.
- Parameters
- task_namestr
The name of the task to load data from.
- filter_strategies_usedbool, optional, default: False
If True, indicates that filter strategies were used during the experiment.
- Returns
None
- extract_paremeter_value(parameters_used: List[Dict[str, Any]], parameter_name: str) str | float #
Extracts the current value of a specified parameter from a list of parameters.
- Parameters
- parameters_usedlist of dict
A list of dictionaries containing parameter information.
- parameter_namestr
The name of the parameter to extract.
- Returns
- str | float
The current value of the specified parameter.
- extract_used_metrics(experiment_metrics: List[Dict[str, Any]]) List[Dict[str, Any]] #
Extract a list of unique metrics from the given experiment metrics that are also present in the metrics list.
- Parameters
- experiment_metricsList[Dict]
A list of dictionaries where each dictionary represents a metric with various attributes, including metricName.
- Returns
- List[dict]
A list of unique metric dictionaries where metricName exists in the global metrics list.
- get_data(filter_strategies_used: bool) None #
Starts the process of downloading the workspace task data for the tasks defined in constants.COMET_WORKSPACE and constants.TASK_NAMES.
- Parameters
- filter_strategies_usedbool
Must be set to either True or False. True indicates filter strategies were used during the experiment. False indicates no filter strategies were explicitly used.
- Returns
None
- load_experiment_data(experiment: APIExperiment, filter_strategies_used: bool | None = False) None #
Loads and organizes experiment data, including metrics, parameters, and assets.
- Parameters
- experimentcomet.APIExperiment
A Comet APIExperiment object containing the data from the experiment.
- filter_strategies_usedbool, optional, default: False
If True, includes filter strategy information in the data extraction.
- Returns
None