Support recent versions of black and lightning #260
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andpytorch-lightning_version
, which are attributes that weren't included in the dict written out byto_disk
.Additional context
to_disk
is only used in the test suite. I added a note to clarify thatto_disk
mimics theweights_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 callsTrainer.save_checkpoint
which includes all the goodies (callbacks, lr schedulers, optimizers).