Skip to content

Global & Special Loggers #20634

@jamie-mcg

Description

@jamie-mcg

Description & Motivation

The trainer currently treats all loggers the same, meaning that if you design a custom logger for a specific purpose, it gets called every time self.log is called. This means if I have two separate CSVLogger's defined, one for normal training metrics and another for some non-standard metrics that do not fit with the 1st loggers schema, then PL will still attempt to log all metrics to both CSVLoggers.

It would be nice to have the ability to separate Global loggers (i.e. ones that should be activated with self.log) and those which are more specific to an independent purpose.

Pitch

I believe it can be done fairly easily by allowing for a separate logger-type list to be added to the Trainer class (i.e. logger_others (or some better name...), then the LoggerConnector class can simply configure the two separately.

Alternatives

I think the only alternative is to instantiate a separate logger class within the Callback? But this has all sorts of integration issues that you need to do to get it to work with the trainer.

Additional context

Very happy to open a PR with a proposed solution for this.

cc @lantiga @Borda

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