Skip to content

Commit

Permalink
[Docs] MLflow casing (mosaicml#2609)
Browse files Browse the repository at this point in the history
Co-authored-by: Mihir Patel <[email protected]>
  • Loading branch information
aspfohl and mvpatel2000 committed Oct 5, 2023
1 parent f05ff1c commit de760ed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions composer/loggers/mlflow_logger.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2022 MosaicML Composer authors
# SPDX-License-Identifier: Apache-2.0

"""Log to `MLFlow <https://www.mlflow.org/docs/latest/index.html>."""
"""Log to `MLflow <https://www.mlflow.org/docs/latest/index.html>."""

from __future__ import annotations

Expand Down Expand Up @@ -29,15 +29,15 @@


class MLFlowLogger(LoggerDestination):
"""Log to `MLFlow <https://www.mlflow.org/docs/latest/index.html>`_.
"""Log to `MLflow <https://www.mlflow.org/docs/latest/index.html>`_.
Args:
experiment_name: (str, optional): MLFLow experiment name. If not set it will be
use the MLFLOW environment variable or a default value
run_name: (str, optional): MLFlow run name. If not set it will be the same as the
experiment_name: (str, optional): MLflow experiment name. If not set it will be
use the MLflow environment variable or a default value
run_name: (str, optional): MLflow run name. If not set it will be the same as the
Trainer run name
tracking_uri (str | pathlib.Path, optional): MLFlow tracking uri, the URI to the
remote or local endpoint where logs are stored (If none it is set to MLFlow default)
tracking_uri (str | pathlib.Path, optional): MLflow tracking uri, the URI to the
remote or local endpoint where logs are stored (If none it is set to MLflow default)
rank_zero_only (bool, optional): Whether to log only on the rank-zero process
(default: ``True``).
flush_interval (int): The amount of time, in seconds, that MLflow must wait between
Expand Down Expand Up @@ -205,11 +205,11 @@ def register_model(
)

def save_model(self, flavor: str, **kwargs):
"""Save a model to MLFlow.
"""Save a model to MLflow.
Args:
flavor (str): The MLFlow model flavor to use. Currently only ``'transformers'`` is supported.
**kwargs: Keyword arguments to pass to the MLFlow model saving function.
flavor (str): The MLflow model flavor to use. Currently only ``'transformers'`` is supported.
**kwargs: Keyword arguments to pass to the MLflow model saving function.
Raises:
NotImplementedError: If ``flavor`` is not ``'transformers'``.
Expand All @@ -222,11 +222,11 @@ def save_model(self, flavor: str, **kwargs):
raise NotImplementedError(f'flavor {flavor} not supported.')

def log_model(self, flavor: str, **kwargs):
"""Log a model to MLFlow.
"""Log a model to MLflow.
Args:
flavor (str): The MLFlow model flavor to use. Currently only ``'transformers'`` is supported.
**kwargs: Keyword arguments to pass to the MLFlow model logging function.
flavor (str): The MLflow model flavor to use. Currently only ``'transformers'`` is supported.
**kwargs: Keyword arguments to pass to the MLflow model logging function.
Raises:
NotImplementedError: If ``flavor`` is not ``'transformers'``.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/trainer/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ arguments in :class:`.Trainer`, like the following code, which will log metrics

To attach other loggers, use the ``loggers`` argument. For example, the
below logs the results to `Weights and
Biases <https://www.wandb.com/>`__, `MLFlow <https://www.mlflow.org/docs/latest/index.html>`__, and `CometML <https://www.comet.com/?utm_source=mosaicml&utm_medium=partner&utm_campaign=mosaicml_comet_integration>`__,
Biases <https://www.wandb.com/>`__, `MLflow <https://www.mlflow.org/docs/latest/index.html>`__, and `CometML <https://www.comet.com/?utm_source=mosaicml&utm_medium=partner&utm_campaign=mosaicml_comet_integration>`__,
and also saves them to the file
``log.txt``.

Expand Down

0 comments on commit de760ed

Please sign in to comment.