mlflow_extra package
Submodules
mlflow_extra.common module
Common functionality.
mlflow_extra.filter module
Delete suboptimal runs.
- mlflow_extra.filter.delete_runs(run_ids, total_runs, confirm=False)[source]
Delete the selected runs
- Parameters:
run_ids – An iterable of run IDs to delete.
total_runs – The total number of runs in the data, only used for display.
confirm – If True, delete the run, else perform a dryrun.
- Returns:
True if anything was deleted, False otherwise.
- mlflow_extra.filter.export_csv(experiment_id, path)[source]
Export experiment data to a CSV file.
- Parameters:
experiment_id – The experiment ID.
path – The output path.
- mlflow_extra.filter.filter_by_number(data, columns, number, ascending=False)[source]
Filter rows to only keep a selected number.
- Parameters:
data – The data to filter.
columns – The columns by which to filter the data before selecting the rows.
number – The number of rows to keep.
ascending – If True, sort the data in ascending order before selecting the rows to keep, otherwise sort in descending order.
- mlflow_extra.filter.filter_by_threshold(data, thresholds, ascending=False)[source]
Filter rows in data by threshold values.
- Parameters:
data – The data to filter.
thresholds – A dict mapping column names to threshold values.
ascending – If True, keep values less than or equal to the thresold values, otherwise keep values greater than or equal to the threshold values.
mlflow_extra.merge module
Merge experiments into a common directory.
- mlflow_extra.merge.collect_experiment_names(path)[source]
Collect all experiment names from the experiment directories under the given path.
- Parameters:
path – The directory path containing the experiment directories.
- Returns:
A dict mapping experiment names to lists of experiment directory paths.
- mlflow_extra.merge.copy_experiments(src_path, dst_path)[source]
Copy experiments from one path to another.
- Parameters:
src_path – The source directory from which to move the experiments.
dst_path – The target directory to which to move the experiments.
- mlflow_extra.merge.fix_artifact_uris(path, map_path=None)[source]
Update artifact URIs for all experiments and runs under the given path.
- Parameters:
path – The path containing the experiments to fix.
map_path – An optional path to a YAML file that maps old paths to new ones.
- mlflow_extra.merge.fix_experiment_ids(path)[source]
Fix the experiment IDs for the experiment and all runs under the given path. This will ensure that the experiment ID is a non-negative integer and that the ID matches the experiment’s directory name. The directory will be moved if necessary.
- Parameters:
path – The path to the experiment directory.
- mlflow_extra.merge.merge_experiments_by_name(path)[source]
Merge runs from experiments with the same name into a single experiment.
- Parameters:
path – The directory path containing the experiment directories.
- mlflow_extra.merge.reorder_experiment_ids(path)[source]
Reorder all of the experiment IDs in a directory by their creation time.
- mlflow_extra.merge.script_fix_artifact_uris(args=None)[source]
Attempt to fix broken artifact URIs in experiments and runs.
- mlflow_extra.merge.script_fix_experiment_ids(args=None)[source]
Attempt to fix experiment IDs so that the experiment’s directory and all of its runs match its ID.
mlflow_extra.metadata module
Find and manipulate MLflow metadata files.
- class mlflow_extra.metadata.Metadata(path=None, data=None)[source]
Bases:
object
Metadata wrapper.
- __init__(path=None, data=None)[source]
- Parameters:
path – The path to a metadata file, or a directory that contains one. If not None, then the data will be loaded from the path unless data is also passed via the data parameter.
data – The data. If not None, then the path will not be loaded.
- find_meta(path)[source]
Find all MLflow metadata files in the given directory.
- Parameters:
path – The directory path.
- Returns:
A generator over the metadata file paths as pathlib.Path objects.
- property is_experiment[source]
True if the current metadata appears to be for an experiment and not a run.
- load(path=None)[source]
Load data from a YAML file.
- Parameters:
path – The filepath. If None, the current path will be used.
mlflow_extra.uri module
URI manipulation.
mlflow_extra.version module
Module contents
File stub.