Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MLFlow now uses env variable as default tracking uri #7457

Merged
merged 9 commits into from
May 12, 2021
6 changes: 4 additions & 2 deletions pytorch_lightning/loggers/mlflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
-------------
"""
import logging
import os
import re
from argparse import Namespace
from time import time
Expand Down Expand Up @@ -85,7 +86,8 @@ def any_lightning_module_function_or_hook(self):
Args:
experiment_name: The name of the experiment
tracking_uri: Address of local or remote tracking server.
If not provided, defaults to `file:<save_dir>`.
If not provided, defaults to `MLFLOW_TRACKING_URI` environment variable if set, otherwise it falls
back to `file:<save_dir>`.
tags: A dictionary tags for the experiment.
save_dir: A path to a local directory where the MLflow runs get saved.
Defaults to `./mlflow` if `tracking_uri` is not provided.
Expand All @@ -104,7 +106,7 @@ def any_lightning_module_function_or_hook(self):
def __init__(
self,
experiment_name: str = 'default',
tracking_uri: Optional[str] = None,
tracking_uri: Optional[str] = os.environ.get('MLFLOW_TRACKING_URI'),,
awaelchli marked this conversation as resolved.
Show resolved Hide resolved
tags: Optional[Dict[str, Any]] = None,
save_dir: Optional[str] = './mlruns',
prefix: str = '',
Expand Down