Skip to content

Commit 4b26d72

Browse files
committed
use input filename with extension in the name of the experiment and run
1 parent f8a97c3 commit 4b26d72

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jupyter_scheduler/scheduler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,12 +507,12 @@ def create_job(self, model: CreateJob) -> str:
507507
if model.job_definition_id and model.mlflow_experiment_id:
508508
experiment_id = model.mlflow_experiment_id
509509
else:
510-
experiment_id = mlflow_client.create_experiment(f"{model.name}-{uuid4()}")
510+
experiment_id = mlflow_client.create_experiment(f"{model.input_filename}-{uuid4()}")
511511
model.mlflow_experiment_id = experiment_id
512512
input_file_path = os.path.join(self.root_dir, model.input_uri)
513513
mlflow.log_artifact(input_file_path, "input")
514514

515-
mlflow_run = mlflow_client.create_run(experiment_id=experiment_id, run_name=model.name)
515+
mlflow_run = mlflow_client.create_run(experiment_id=experiment_id, run_name=model.input_filename)
516516
model.mlflow_run_id = mlflow_run.info.run_id
517517

518518
job = Job(**model.dict(exclude_none=True, exclude={"input_uri"}))
@@ -663,7 +663,7 @@ def create_job_definition(self, model: CreateJobDefinition) -> str:
663663
raise InputUriError(model.input_uri)
664664

665665
mlflow_client = mlflow.MlflowClient()
666-
experiment_id = mlflow_client.create_experiment(f"{model.name}-{uuid4()}")
666+
experiment_id = mlflow_client.create_experiment(f"{model.input_filename}-{uuid4()}")
667667
model.mlflow_experiment_id = experiment_id
668668
input_file_path = os.path.join(self.root_dir, model.input_uri)
669669
mlflow.log_artifact(input_file_path, "input")

0 commit comments

Comments
 (0)