Skip to content

Image LoggerΒ #20612

@jamie-mcg

Description

@jamie-mcg

Description & Motivation

Motivation

In various experiments, I find myself attempting to visualize "images" of outputs, gradient covariances, representations etc.

PyTorch lightning has a great feature for tracking these metrics with custom callbacks. However, it requires some extra work in order to merge this behaviour with the logging API.

I would like to propose a new logger based around logging and tracking "images" using matplotlib.

Pitch

I would like to create a new logger focused on logging these types of images. Similar to the CSVLogger which continually saves the desired images across the training run.

In order to not break the current logger API, it can involve a vacuous "log_metrics" method, and then work similar to the TensorboardLogger with custom methods such as "log_image()".

Alternatives

Alternatives are incorporating this all into a callback function but it becomes quite messy with keeping track of log directories/versions and file names. It makes more sense to me to have a custom logger which can interact with callbacks if necessary.

Another option is logging the objects directly to tensorboard, but the display of these is more difficult to control.

Additional context

Expanding on the above, the logger could become more of a "PlottingLogger" in the future in order to not just track real-time visualizations of images/matrices/outputs etc. But also realtime plots of metrics which can be continually updated. This is less essential because tensorboard already incorporates this nicely but in environments where sophisticated loggers are unavailable, this can be a good backup.

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