pennpolygons / cv-boilerplate

Open-source boilerplate for computer vision research
MIT License
16 stars 2 forks source link

Extend logging API to save metrics and images #24

Closed goodmattg closed 4 years ago

goodmattg commented 4 years ago

We should probably be using Ignite built-in functionality to do logging: https://pytorch.org/ignite/contrib/handlers.html#ignite.contrib.handlers.trains_logger.OutputHandler

Is Ignite flexible enough? Should we write a custom logger? Formally define a simple, but flexible interface to log assorted metrics and engine outputs. As of now we have the temporary structure below which says to run a eval_engine on a DataLoader loader and then log arbitrary fields in the metrics dictionary produced by eval_engine.

ChickenTarm commented 4 years ago

Can the logging api only log metrics? how do you log outputs like saving images?

goodmattg commented 4 years ago

The logging API can also handle engine outputs, but from the docs it seems like they only anticipated numerical. I can look for an easy way to do that as custom.

ChickenTarm commented 4 years ago

Right I guess you could define images to be a custom metric and have that metric function do the saving of images and use the hydra folders for the path

goodmattg commented 4 years ago

I am modifying what this task covers. Logging metrics to a logfile and stdout work fine. This now covers: