From de760edebf28b66e8e52f99437308e1e2694c5f3 Mon Sep 17 00:00:00 2001 From: Anna Date: Thu, 5 Oct 2023 14:32:32 -0700 Subject: [PATCH] [Docs] MLflow casing (#2609) Co-authored-by: Mihir Patel --- composer/loggers/mlflow_logger.py | 26 +++++++++++++------------- docs/source/trainer/logging.rst | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/composer/loggers/mlflow_logger.py b/composer/loggers/mlflow_logger.py index 60cae6c958..a586a7294c 100644 --- a/composer/loggers/mlflow_logger.py +++ b/composer/loggers/mlflow_logger.py @@ -1,7 +1,7 @@ # Copyright 2022 MosaicML Composer authors # SPDX-License-Identifier: Apache-2.0 -"""Log to `MLFlow .""" +"""Log to `MLflow .""" from __future__ import annotations @@ -29,15 +29,15 @@ class MLFlowLogger(LoggerDestination): - """Log to `MLFlow `_. + """Log to `MLflow `_. 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 @@ -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'``. @@ -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'``. diff --git a/docs/source/trainer/logging.rst b/docs/source/trainer/logging.rst index 0f7b44ca54..48ca8c47b2 100644 --- a/docs/source/trainer/logging.rst +++ b/docs/source/trainer/logging.rst @@ -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 `__, `MLFlow `__, and `CometML `__, +Biases `__, `MLflow `__, and `CometML `__, and also saves them to the file ``log.txt``.