Merged Documentation¶
Documentation for MLFlow Methods¶
get_experiment_id_by_name
¶
Functionality¶
This function takes an experiment name and returns its corresponding experiment ID using MLFlow. If no matching experiment is found, it returns None.
Parameters¶
experiment_name
(str): The name of the experiment to retrieve the ID for.
Returns¶
str
orNone
: The experiment ID if found, otherwise None.
Usage¶
- Purpose: Retrieve the ID of a given experiment for tracking and logging purposes.
Example¶
experiment_id = get_experiment_id_by_name(
"Example_Experiment"
)
print(experiment_id)
get_run_id_by_name
¶
Functionality¶
Search for a run within a given experiment by matching the run name. It returns the run_id of the first matching run. If no run is found, the function returns None.
Parameters¶
experiment_id
: MLFlow experiment identifier as a string.run_name
: MLFlow run name to filter the experiments.
Usage¶
- Purpose: Retrieve the run_id for a specified run within an experiment.
Example¶
import mlflow
experiment_id = "123456"
run_name = "my_run"
run_id = get_run_id_by_name(experiment_id, run_name)
print(run_id)
get_mlflow_results_url
¶
Functionality¶
Generates a URL for checking MLflow experiment results by setting the tracking URI and filtering experiments based on a naming convention.
Parameters¶
mlflow_url
: MLflow tracking URI.batch_id
: ID representing the released batch.model_id
: ID of the model for constructing the experiment name.
Usage¶
- Purpose: Retrieve the experiment ID of the first matching experiment, based on a naming convention derived from model and batch IDs.
Example¶
Assuming MLflow server at 'http://localhost', batch 'batch123', and model 'modelXYZ':
url = get_mlflow_results_url('http://localhost', 'batch123', 'modelXYZ')