Skip to content

Commit

Permalink
Replace exception with logger warning
Browse files Browse the repository at this point in the history
Signed-off-by: Marius Schlegel <marius.schlegel@tu-ilmenau.de>
  • Loading branch information
mariusschlegel committed Apr 6, 2023
1 parent fc161a0 commit 8afba57
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions mlflow/store/tracking/file_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,7 @@ def delete_experiment(self, experiment_id):
run_id = run.info.run_id
run_info = self._get_run_info(run_id)
if run_info is None:
raise MlflowException(
"Run '%s' metadata is in invalid state." % run_id, databricks_pb2.INVALID_STATE
)
logging.warning(f"Run {run_id} metadata is in invalid state.")
new_info = run_info._copy_with_overrides(lifecycle_stage=LifecycleStage.DELETED)
self._overwrite_run_info(new_info, deleted_time=deletion_time)
meta_dir = os.path.join(self.root_directory, experiment_id)
Expand Down Expand Up @@ -482,9 +480,7 @@ def restore_experiment(self, experiment_id):
run_id = run.info.run_id
run_info = self._get_run_info(run_id)
if run_info is None:
raise MlflowException(
"Run '%s' metadata is in invalid state." % run_id, databricks_pb2.INVALID_STATE
)
logging.warning(f"Run {run_id} metadata is in invalid state.")
new_info = run_info._copy_with_overrides(lifecycle_stage=LifecycleStage.ACTIVE)
self._overwrite_run_info(new_info, deleted_time=None)
overwrite_yaml(
Expand Down

0 comments on commit 8afba57

Please sign in to comment.