Skip to content

Log default metrics #20418

@ierezell

Description

@ierezell

Description & Motivation

When training a model, I have to specify dataloaders, epochs, learning rate and I would like them to be logged by default (like huggingface).
(Could be a DeviceStatMonitor + Batch throughput + dataset metrics)

Pitch

When training a model, many metrics are accessible and it would be really nice to log them directly like :

Pseudo-code

def Trainer.fit(): 
    for metric in ["learning_rate", "train_dataloader_len", "precision", "epochs", "limit_batches", ...]: 
        for logger in logger_that_has_been_set: 
            logger.log(metric, value)

Alternatives

Log all the metrics myself for all the loggers like defined above (long and tedious...), a flag like "log_default_metrics=True" would be a nice alternative.

Additional context

I'm using Databricks (mlflow) and I can have my custom model metrics but nothing in the system metrics or default parameters, default model metrics.

Thanks for the framework, it's really nice !

cc @Borda @awaelchli

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIs an improvement or enhancementloggerRelated to the Loggers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions