Skip to content

[<Library component: Models|Core|etc...>] MLflow Logging multiple models  #1228

@Dansk04

Description

@Dansk04

Description

Hello,
in the Documentation MLflow is used for logging only one model in a run. Now there is the functionality to train several models like in the example provided below.

models = [
    KAN(input_size=2*horizon,
        h=horizon,
        scaler_type='robust',
        max_steps=2,
        early_stop_patience_steps=3),
    LSTM(input_size=2*horizon,
        h=horizon,
        scaler_type='robust',
        max_steps=2,
        early_stop_patience_steps=3)
                
]
  mlflow.pytorch.autolog(checkpoint=False)
  with mlflow.start_run() as run:
      nf = NeuralForecast(models=models, freq='M')
      nf.fit(full_train, val_size=horizon)  
      mlflow.pytorch.get_default_conda_env()
      `mlflow.pytorch.get_default_pip_requirements()

When logging with MLflow, one run is created for all models and the logged metrics cannot be differentiated between the individual models.
Is there a possibility to log each model individually when fitting nf objects which contains multiple models? Or is the only way to train each model individually?

Use case

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions