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

Support recent versions of black and lightning #260

Merged
merged 2 commits into from
Feb 11, 2023
Merged

Conversation

ejm714
Copy link
Collaborator

@ejm714 ejm714 commented Feb 10, 2023

Fixes #258 -- the latest black changed rules about whitespace lines

Fixes #256 -- PTL 1.9.0 introduces migrations applied to checkpoints saved with previous versions (docs). The tests were erroring since they were looking for global_step and pytorch-lightning_version, which are attributes that weren't included in the dict written out by to_disk.

Additional context

to_disk is only used in the test suite. I added a note to clarify that to_disk mimics the weights_only option in saving out the checkpoint file. Generally, saving to disk is done under the hood as we use PTL's built-in "best" checkpoint saving during training, which calls Trainer.save_checkpoint which includes all the goodies (callbacks, lr schedulers, optimizers).

@netlify
Copy link

netlify bot commented Feb 10, 2023

Deploy Preview for silly-keller-664934 ready!

Name Link
🔨 Latest commit 3090b65
🔍 Latest deploy log https://app.netlify.com/sites/silly-keller-664934/deploys/63e6d7ce8d135b0008d97267
😎 Deploy Preview https://deploy-preview-260--silly-keller-664934.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link
Contributor

@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2023

Codecov Report

Merging #260 (3090b65) into master (56db26a) will increase coverage by 0.0%.
The diff coverage is 100.0%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@          Coverage Diff           @@
##           master    #260   +/-   ##
======================================
  Coverage    87.6%   87.6%           
======================================
  Files          32      32           
  Lines        2174    2175    +1     
======================================
+ Hits         1906    1907    +1     
  Misses        268     268           
Impacted Files Coverage Δ
zamba/cli.py 84.8% <ø> (ø)
zamba/models/config.py 97.4% <ø> (ø)
zamba/models/efficientnet_models.py 100.0% <ø> (ø)
zamba/models/model_manager.py 84.3% <ø> (ø)
zamba/models/depth_estimation/depth_manager.py 99.1% <100.0%> (ø)
zamba/pytorch_lightning/utils.py 97.5% <100.0%> (+<0.1%) ⬆️

@ejm714 ejm714 requested a review from pjbull February 11, 2023 00:09
Copy link
Member

@pjbull pjbull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @ejm714!

@pjbull pjbull merged commit e9a28b9 into master Feb 11, 2023
@pjbull pjbull deleted the 547-fix-black branch February 11, 2023 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed build on master branch (tests #547) Failed build on master branch (tests #545)
3 participants