Skip to content

Commit 6d38c89

Browse files
committed
slight adjustment
1 parent ebdedaa commit 6d38c89

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

compose_rl/utils/mlflow_utils.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,14 @@ def get_valid_mlflow_experiment_name(config: Any) -> str:
2727

2828

2929
def get_mlflow_relative_path_for_save_folder(save_folder: str) -> str:
30-
"""Returns the relative path for the given save folder
31-
32-
Relative in mlflow need to be of the format: `artifacts/{relative_path}`
33-
"""
34-
return os.path.join('artifacts', save_folder.lstrip('/'))
30+
"""Returns the relative path for the given save folder"""
31+
return save_folder.lstrip('/')
3532

3633

3734
def get_mlflow_absolute_path_for_save_folder(save_folder: str) -> str:
3835
"""Returns the mlflow artifact path for the given save folder"""
3936
mlflow_prefix = 'dbfs:/databricks/mlflow-tracking/{mlflow_experiment_id}/{mlflow_run_id}'
40-
mlflow_artifact_path = os.path.join(mlflow_prefix, get_mlflow_relative_path_for_save_folder(save_folder))
37+
mlflow_artifact_path = os.path.join(mlflow_prefix, 'artifacts', get_mlflow_relative_path_for_save_folder(save_folder))
4138
return mlflow_artifact_path
4239

4340

0 commit comments

Comments
 (0)