From 9eacbe591d46f7b4669652ade4e511d5ce7fdc16 Mon Sep 17 00:00:00 2001 From: Mengqi <2534671415@qq.com> Date: Sat, 2 Mar 2024 16:13:55 +0800 Subject: [PATCH] fix: fix the problem that MLflow Tracking reports that Yaml file does not exist. --- geochemistrypi/data_mining/cli_pipeline.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/geochemistrypi/data_mining/cli_pipeline.py b/geochemistrypi/data_mining/cli_pipeline.py index db44495d..37783e87 100644 --- a/geochemistrypi/data_mining/cli_pipeline.py +++ b/geochemistrypi/data_mining/cli_pipeline.py @@ -137,8 +137,8 @@ def cli_pipeline(training_data_path: str, application_data_path: Optional[str] = # Create a new experiment or use the previous experiment is_used_previous_experiment = Confirm.ask("✨ Use Previous Experiment", default=False) # Set the tracking uri to the local directory, in the future, we can set it to the remote server. - artifact_localtion = f"file:{WORKING_PATH}/geopi_tracking" - mlflow.set_tracking_uri(artifact_localtion) + experiments_localtion = f"file:{WORKING_PATH}/geopi_tracking" + mlflow.set_tracking_uri(experiments_localtion) # Print the tracking uri for debugging. # print("tracking uri:", mlflow.get_tracking_uri()) if is_used_previous_experiment: @@ -159,7 +159,7 @@ def cli_pipeline(training_data_path: str, application_data_path: Optional[str] = # new_experiment_tag = Prompt.ask("✨ Experiment Tag Version", default="E - v1.0.0") try: # new_experiment_id = mlflow.create_experiment(name=new_experiment_name, artifact_location=artifact_localtion, tags={"version": new_experiment_tag}) - new_experiment_id = mlflow.create_experiment(name=new_experiment_name, artifact_location=artifact_localtion) + new_experiment_id = mlflow.create_experiment(name=new_experiment_name) except mlflow.exceptions.MlflowException as e: if "already exists" in str(e): console.print(" The experiment name already exists.", style="bold red")