Skip to content

Commit

Permalink
fix: get MLFLOW_TRACKING_UTI from env variables as default (#2107)
Browse files Browse the repository at this point in the history
* fix: get MLFLOW_TRACKING_UTI from env variables as default

In `AnomalibMLFlowLogger`, `tracking_uri` was set to None, which was overriding the parameter in the underlying pytorch `MLFloeLogger` so never could log into remote server. This fixes it.

* Update src/anomalib/loggers/mlflow.py

* Update mlflow.py

---------

Co-authored-by: Carlos Nácher <cnacher@nutai.com>
Co-authored-by: Samet Akcay <samet.akcay@intel.com>
  • Loading branch information
3 people committed Jul 11, 2024
1 parent e7e6cb8 commit d094d4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/anomalib/loggers/mlflow.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""MLFlow logger with add image interface."""

import os
from typing import Literal

import numpy as np
Expand Down Expand Up @@ -65,7 +66,7 @@ def __init__(
self,
experiment_name: str | None = "anomalib_logs",
run_name: str | None = None,
tracking_uri: str | None = None,
tracking_uri: str | None = os.getenv("MLFLOW_TRACKING_URI"),
save_dir: str | None = "./mlruns",
log_model: Literal[True, False, "all"] | None = False,
prefix: str | None = "",
Expand Down

0 comments on commit d094d4b

Please sign in to comment.