MLFlow Config

MLFlow Config#

class rizemind.logging.mlflow.config.MLFlowConfig(*, experiment_name: str, run_name: str, mlflow_uri: str)[source]

Bases: BaseConfig

A data class for holding MLflow configuration parameters.

This class provides a structured way to manage and access MLflow-specific settings, such as the experiment name, run name, and tracking URI. It inherits from a base configuration class and includes a factory method to conveniently load the configuration from a Flower context.

experiment_name

The name of the MLflow experiment to use for logging.

Type:

str

run_name

The name to assign to the MLflow run.

Type:

str

mlflow_uri

The URI of the MLflow tracking server.

Type:

str

experiment_name: str
static from_context(ctx: Context) MLFlowConfig | None[source]

Loads MLflow configuration from the context.

This static method acts as a factory to create an MLFlowConfig instance by extracting records from the provided Context object. It looks for a specific key (MLFLOW_CONFIG_KEY) within the context’s state.

Parameters:

ctx – The Flower context object which may contain the MLflow configuration records.

Returns:

An instance of MLFlowConfig if the configuration is found in the context, otherwise None.

Return type:

MLFlowConfig | None

mlflow_uri: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

run_name: str