Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Trainer] dictionary access to multiple named loggers #10636

Open
remisphere opened this issue Nov 19, 2021 · 2 comments
Open

[Trainer] dictionary access to multiple named loggers #10636

remisphere opened this issue Nov 19, 2021 · 2 comments
Labels
feature Is an improvement or enhancement logger Related to the Loggers trainer: argument
Milestone

Comments

@remisphere
Copy link

remisphere commented Nov 19, 2021

🚀 Feature

When using multiple loggers, being able to give a dict of loggers to the Trainer() instead of a list.

Motivation

I find the current list access when calling a single logger not explicit.

Pitch

trainer = Trainer(
    logger={
        'tensorboard': TensorBoardLogger(...),
        'csv': CSVLogger(...)},
    ...
)

then in the loop:

self.logger['tensorboard'].experiment.add_image(...)

instead of

self.logger[0].experiment.add_image(...)

There could be an ambiguity when using an integer as key, so maybe enforce string-only keys.

cc @Borda @awaelchli @edward-io @ananthsub @rohitgr7 @kamil-kaczmarek @Raalsky @Blaizzy @justusschock @kaushikb11

@remisphere remisphere added the feature Is an improvement or enhancement label Nov 19, 2021
@akihironitta akihironitta added the logger Related to the Loggers label Nov 21, 2021
@awaelchli
Copy link
Contributor

This seems reasonable to me. IMO this should also open up discussions around referencing optimizers by name.

@stale
Copy link

stale bot commented Dec 27, 2021

This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions, Pytorch Lightning Team!

@stale stale bot added the won't fix This will not be worked on label Dec 27, 2021
@awaelchli awaelchli added this to the 1.7 milestone Dec 30, 2021
@stale stale bot removed the won't fix This will not be worked on label Dec 30, 2021
@carmocca carmocca modified the milestones: pl:1.7, future Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Is an improvement or enhancement logger Related to the Loggers trainer: argument
Projects
None yet
Development

No branches or pull requests

4 participants