Pytorch-lightning: versions after .5.2.1 do not print weights summary

Created on 16 Nov 2019  Â·  9Comments  Â·  Source: PyTorchLightning/pytorch-lightning

ubuntu 18.04.3lts, no virtual environment

Model summary is not printed in versions .5.3, .5.3.1, and .5.3.2. trainer.weights_summary is set to 'full', but nothing is printed on screen.

bug / fix

Most helpful comment

We can also check of the LOG_LEVEL is INFO then print just for this case. So we still respect the LOGGING LEVEL but have correct formatting

All 9 comments

This is because they recently changed from printing to logging (#282, #457) and the summary is logged as info, but the log level is set to warning and above.
With
logging.getLogger().setLevel(logging.INFO)
you can see the summary, but the formatting is messed up because of the "INFO" text in front.

The summary logging happens here.

@Borda @Ir1d How do we have to configure the logging so it always shows the summary?

We have moved from print to standard Python logging

Yes, when it didn't print a quick look at the code showed the shift to logging. And it is easy to just print the summary myself - so no need to change - I just thought it best to bring it to your attention in case this was not intended.

I believe that the logging should be visible in terminal...

Ahh I didn't notice this case before, thx for bringing this up @sneiman @awaelchli

A possible fix would be to simply use print here? since summarize() seems to be called outside the tqdm loop.

@williamFalcon what do you think?

We can also consider removing the level msgs like this: https://stackoverflow.com/questions/46584670/remove-the-log-level-printing-in-python-logging

We can also check of the LOG_LEVEL is INFO then print just for this case. So we still respect the LOGGING LEVEL but have correct formatting

@awaelchli
Hi, the logging level is set here, should it behave the same with logging.getLogger().setLevel(logging.INFO) ?

@jeffling I agree with you, I'll open a PR soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

as754770178 picture as754770178  Â·  3Comments

DavidRuhe picture DavidRuhe  Â·  3Comments

jcreinhold picture jcreinhold  Â·  3Comments

srush picture srush  Â·  3Comments

Vichoko picture Vichoko  Â·  3Comments