Source code for geochemistrypi.data_mining.utils.mlflow_utils
fromtypingimportUnionimportmlflow
[docs]defretrieve_previous_experiment_id(experiment_name:str)->Union[str,None]:"""Retrieve the previous experiment with the same name. Parameters ---------- experiment_name : str The name of the experiment. Returns ------- experiment_id : str The ID of the experiment. """experiment=mlflow.get_experiment_by_name(experiment_name)ifexperiment:returnexperiment.experiment_idelse:returnNone