Skip to content

Commit de7f462

Browse files
millskylepre-commit-ci[bot]
authored andcommitted
Error when logging to MLFlow deleted experiment (#20556)
* Make error MLFlow deleted experiment explicit --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> (cherry picked from commit 29ed24f)
1 parent fc6c006 commit de7f462

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lightning/pytorch/loggers/mlflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def experiment(self) -> "MlflowClient":
180180

181181
if self._experiment_id is None:
182182
expt = self._mlflow_client.get_experiment_by_name(self._experiment_name)
183-
if expt is not None:
183+
if expt is not None and expt.lifecycle_stage != "deleted":
184184
self._experiment_id = expt.experiment_id
185185
else:
186186
log.warning(f"Experiment with name {self._experiment_name} not found. Creating it.")

0 commit comments

Comments
 (0)