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

versions after .5.2.1 do not print weights summary #518

Closed
sneiman opened this issue Nov 16, 2019 · 9 comments · Fixed by #580
Closed

versions after .5.2.1 do not print weights summary #518

sneiman opened this issue Nov 16, 2019 · 9 comments · Fixed by #580
Labels
bug Something isn't working

Comments

@sneiman
Copy link
Contributor

sneiman commented Nov 16, 2019

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.

@sneiman sneiman added the bug Something isn't working label Nov 16, 2019
@awaelchli
Copy link
Contributor

awaelchli commented Nov 27, 2019

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.

@awaelchli
Copy link
Contributor

The summary logging happens here.

@awaelchli
Copy link
Contributor

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

@Borda
Copy link
Member

Borda commented Nov 27, 2019

We have moved from print to standard Python logging

@sneiman
Copy link
Contributor Author

sneiman commented Nov 27, 2019

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.

@Borda
Copy link
Member

Borda commented Nov 27, 2019

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

@Ir1d
Copy link
Contributor

Ir1d commented Nov 28, 2019

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

@jeffling
Copy link
Contributor

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

@Ir1d
Copy link
Contributor

Ir1d commented Dec 3, 2019

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
5 participants