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

Disable ignoring net in mnist module #481

Merged
merged 4 commits into from
Dec 17, 2022
Merged

Disable ignoring net in mnist module #481

merged 4 commits into from
Dec 17, 2022

Conversation

ashleve
Copy link
Owner

@ashleve ashleve commented Dec 17, 2022

What does this PR do?

Disables ignoring net object in mnist module.

Originally we were ignoring it since lightning was displaying a warning that net parameters will be stored in ckpt either way, but it turns out user is not able to load MNISTLitModule from ckpt as easily when net is ignored.

When not ignoring net, we can load model from ckpt with MNISTLitModule.load_from_checkpoint(...) and it works out of the box (without the need to additionally provide the net object as call argument).

Should be less confusing for users.

Fix #456

Before submitting

  • Did you make sure title is self-explanatory and the description concisely explains the PR?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you test your PR locally with pytest command?
  • Did you run pre-commit hooks with pre-commit run -a command?

Did you have fun?

Make sure you had fun coding 🙃

@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2022

Codecov Report

Base: 84.46% // Head: 84.46% // No change to project coverage 👍

Coverage data is based on head (91ac00a) compared to base (28386d6).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #481   +/-   ##
=======================================
  Coverage   84.46%   84.46%           
=======================================
  Files           9        9           
  Lines         354      354           
=======================================
  Hits          299      299           
  Misses         55       55           
Impacted Files Coverage Δ
src/models/mnist_module.py 98.41% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ashleve ashleve merged commit 75b44ff into main Dec 17, 2022
@ashleve ashleve deleted the fix-ckpt branch December 17, 2022 21:43
@ashleve ashleve changed the title Fix loading MNISTLitModule from ckpt Disable ignoring net in mnist module Dec 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to use the load_from_checkpoint to load a ckpt?
2 participants