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

Updated SparseML callback for latest PyTorch Lightning #822

Merged
merged 7 commits into from
May 4, 2022
Merged

Updated SparseML callback for latest PyTorch Lightning #822

merged 7 commits into from
May 4, 2022

Conversation

clementpoiret
Copy link
Contributor

@clementpoiret clementpoiret commented Apr 22, 2022

What does this PR do?

It fixes an issue, where steps_per_epoch had to be positive. With recent pl lightning, it is -1 so it raises an error.

  • Fix for max_steps (now defaults to -1), leading the callback to pass trainer.max_steps to steps_per_epoch, raising an error,
  • Fix for deprecation of num_gpus, num_processes and tpu_cores. Those attributes will be deleted, and we should use num_devices instead. To avoid breaking changes, the old behavior stays the same if trainer has no num_devices attribute.

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests? [not needed for typos/docs]
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

* Fix for `max_steps` (defaults to `-1`),
* Fix for deprecation of `num_gpus`, `num_processes` and `tpu_cores`.
@clementpoiret clementpoiret marked this pull request as ready for review April 22, 2022 09:44
Copy link
Contributor

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

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

❤️

@Borda Borda merged commit 1e962eb into Lightning-Universe:master May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants