mlflow/mlflow · warning · FutureWarning

Environment variable MLFLOW_LOGGING_CONFIGURE_LOGGING is dep

Error message

Environment variable MLFLOW_LOGGING_CONFIGURE_LOGGING is deprecated and will be removed in a future release. Please use MLFLOW_CONFIGURE_LOGGING instead.

What it means

The MLFLOW_LOGGING_CONFIGURE_LOGGING environment variable was renamed to MLFLOW_CONFIGURE_LOGGING. MLflowEnvironmentVariable.get() detects the old name while reading the new variable and emits a FutureWarning, but still honors the old value (lowercased 'true'/'1' becomes True).

Source

Thrown at mlflow/environment_variables.py:80

class _BooleanEnvironmentVariable(_EnvironmentVariable):
    """
    Represents a boolean environment variable.
    """

    def __init__(self, name, default):
        # `default not in [True, False, None]` doesn't work because `1 in [True]`
        # (or `0 in [False]`) returns True.
        if not (default is True or default is False or default is None):
            raise ValueError(f"{name} default value must be one of [True, False, None]")
        super().__init__(name, bool, default)

    def get(self):
        # TODO: Remove this block in MLflow 3.2.0
        if self.name == MLFLOW_CONFIGURE_LOGGING.name and (
            val := os.environ.get("MLFLOW_LOGGING_CONFIGURE_LOGGING")
        ):
            warnings.warn(
                "Environment variable MLFLOW_LOGGING_CONFIGURE_LOGGING is deprecated and will be "
                f"removed in a future release. Please use {MLFLOW_CONFIGURE_LOGGING.name} instead.",
                FutureWarning,
                stacklevel=2,
            )
            return val.lower() in ["true", "1"]

        if not self.defined:
            return self.default

        val = os.environ.get(self.name)
        lowercased = val.lower()
        if lowercased not in ["true", "false", "1", "0"]:
            raise ValueError(
                f"{self.name} value must be one of ['true', 'false', '1', '0'] (case-insensitive), "
                f"but got {val}"
            )
        return lowercased in ["true", "1"]

View on GitHub (pinned to 6a27f2decc)

Solutions

  1. Rename the variable: use MLFLOW_CONFIGURE_LOGGING=true instead of MLFLOW_LOGGING_CONFIGURE_LOGGING=true.
  2. Update Dockerfiles, CI workflows, and shell profiles to the new name.
  3. Remove the old variable entirely to avoid ambiguity if both are set.

Example fix

# before
export MLFLOW_LOGGING_CONFIGURE_LOGGING=true

# after
export MLFLOW_CONFIGURE_LOGGING=true
Defensive patterns

Strategy: validation

Validate before calling

import os
if "MLFLOW_LOGGING_CONFIGURE_LOGGING" in os.environ:
    raise EnvironmentError("Use MLFLOW_CONFIGURE_LOGGING instead of MLFLOW_LOGGING_CONFIGURE_LOGGING")

Type guard

def uses_deprecated_logging_env(env=os.environ) -> bool:
    return "MLFLOW_LOGGING_CONFIGURE_LOGGING" in env

Try / catch

import warnings
with warnings.catch_warnings(record=True) as caught:
    warnings.simplefilter("always")
    import mlflow
for w in caught:
    if "MLFLOW_LOGGING_CONFIGURE_LOGGING is deprecated" in str(w.message):
        print("rename env var to MLFLOW_CONFIGURE_LOGGING")

Prevention

When it happens

Trigger: Exporting MLFLOW_LOGGING_CONFIGURE_LOGGING=true (or 1) in the environment, then importing mlflow or reading MLFLOW_CONFIGURE_LOGGING.get(); the deprecated name is detected and warned about.

Common situations: Dockerfiles, CI configs, or shell profiles written before MLflow 3.2; copy-pasted env setup from older docs.

Related errors


AI-assisted analysis of mlflow/mlflow@6a27f2decc (2026-08-29). Data as JSON: /api/errors/d7147aef7e0e9afc. Report an issue: GitHub.