Pytorch-lightning: [metrics] reuse metrics in a progress bar

Created on 29 Mar 2020  ·  6Comments  ·  Source: PyTorchLightning/pytorch-lightning

🚀 Feature

reduce duplicated metrics in general output dict and progress bar

Motivation

it can be confusing for a user to passing the same metric multiple times in single output

Pitch

in such case just specify key/name of metric shown in progress bar... but still it would make it less flexible to show what you want
just having {'loss': None, "my-var": 123} and none mean that it takes from the general/upper-level dict?

Additional context

https://pytorch-lightning.slack.com/archives/CQXV8BRH9/p1585479078063900

Metrics enhancement good first issue help wanted

All 6 comments

Could you elaborate a little bit more?
The problem relies on whether a user wants to override a metric such as loss, for example, which is print by default in the progress bar. So, if the user wants to keep that parent loss, it should specify “loss”: None. I notice that the output of the progress bar is here. Where this self.add_tqdm_metrics is implemented or could you provide me an idea on where to start?

I assume this will be solved in #1989

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@Borda I think we can close this, since users just need to use the Result objects to remove such duplications

@Borda I think we can close this, since users just need to use the Result objects to remove such duplications

We need to keep dics, so any thoughts about this?
Cc: @PyTorchLightning/core-contributors

I agree that we need to keep dictionaries for backward compatibility, I just think that if we offer a solution to users that takes care of the problem (Result objects) and it is not that hard to convert from dictionaries, then it is not really a problem :]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mmsamiei picture mmsamiei  ·  3Comments

monney picture monney  ·  3Comments

remisphere picture remisphere  ·  3Comments

justusschock picture justusschock  ·  3Comments

anthonytec2 picture anthonytec2  ·  3Comments