Configuration¶
Settings are loaded from environment variables. When pydantic-settings is
installed (pip install inspect-mlflow[config]), settings are typed and
validated. Without it, a dataclass fallback reads the same environment
variables.
Both MLFLOW_ and INSPECT_MLFLOW_ prefixes are supported. The
INSPECT_MLFLOW_ prefix takes priority when both are set.
Env var |
Default |
Description |
|---|---|---|
|
– |
MLflow server URL (required for tracking hook) |
|
|
Experiment name |
|
|
Enable execution tracing |
|
|
Log eval artifacts |
|
|
Same as above (new prefix, takes priority) |
|
|
Enable MLflow provider autolog integrations |
|
|
CSV or JSON array of providers to autolog |
Autolog support map includes openai, anthropic, langchain, litellm,
mistral, groq, cohere, gemini, and bedrock.
Each provider is enabled only when both the corresponding MLflow flavor module and
provider SDK are available in the environment.
API Reference¶
Configuration for inspect-mlflow hooks.
Uses pydantic-settings when available for typed, validated config with the INSPECT_MLFLOW_ prefix. Falls back to os.getenv() when pydantic-settings is not installed.
- class inspect_mlflow.config.MLflowSettings(tracking_uri: str | None = None, experiment_name: str = 'inspect_ai', tracing_enabled: bool = False, log_artifacts: bool = True, autolog_enabled: bool = True, autolog_models: list[str] = <factory>)¶
Fallback settings using os.getenv() when pydantic-settings is not installed.
- inspect_mlflow.config.load_settings() MLflowSettings¶