materialsvirtuallab / matgl

Graph deep learning library for materials
BSD 3-Clause "New" or "Revised" License
233 stars 57 forks source link

log the # of parameters when loading the model #184

Closed JiQi535 closed 7 months ago

JiQi535 commented 8 months ago

When loading a model, I think it is helpful to log the # of parameters and the path of the stored model.

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (8ae8027) 98.00% compared to head (359197e) 98.00%. Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #184 +/- ## ======================================= Coverage 98.00% 98.00% ======================================= Files 28 28 Lines 1901 1906 +5 ======================================= + Hits 1863 1868 +5 Misses 38 38 ``` | [Files](https://app.codecov.io/gh/materialsvirtuallab/matgl/pull/184?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=materialsvirtuallab) | Coverage Δ | | |---|---|---| | [matgl/utils/io.py](https://app.codecov.io/gh/materialsvirtuallab/matgl/pull/184?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=materialsvirtuallab#diff-bWF0Z2wvdXRpbHMvaW8ucHk=) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

shyuep commented 8 months ago

This is the wrong way to use logging. A logger level shouldn't be set in the code. It should be set in your script when you actually use it. You may want to have the # of parameters printed, but other people may not care to see it.