-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Revert deprecation of device flags #12490
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
Conversation
| - Deprecated `Trainer.num_gpus` in favor of `Trainer.num_devices` when GPU is used ([#12384](https://github.com/PyTorchLightning/pytorch-lightning/pull/12384)) | ||
|
|
||
|
|
||
| - Deprecated `Trainer.ipus` in favor of `Trainer.num_devices` when IPU is used ([#12386](https://github.com/PyTorchLightning/pytorch-lightning/pull/12386)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we reverting this? Could you please add some details to the description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rohitgr7 In our brief discussion earlier with Will and team we were just talking about the trainer arguments. The properties can be deprecated more freely as the impact and number of code changes on the user side is rare and small. So I don't think this PR is necessary.
carmocca
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think these should be un-deprecated.
The deprecation concerns only the Trainer's properties but does not touch the __init__'s arguments of the same name.
The suggestion of using num_devices is natural, especially after the accelerator connector rewrite.
|
If we could just revert this addition here, then that should be all I think. Couldn't find any others. We can simply resume efforts on #11040 after the release 😃 edit: done in #12495 (comment) |
|
The deprecation of the Trainer properties was also a natural progression toward deprecating the Trainer flags. As we are moving towards the accelerator agnostic attributes for the users. IMO, if we are not deprecating |
Currently, I think suggesting user to use device agnostic properties to access their device count or ids is natural even we don't deprecate the arguments. The suggested properties are more general and have clear expectations on the return values from their names. In addition, if we decide they'll be removed eventually, I feel it's better to add deprecation message and prepare people early. |
|
Why not just do the deprecation of the constructor arguments in this release as well? #11040 is ready to go |
|
We are not comfortable doing this very impactful change for the community one day away from the release. |
|
I'm closing this, as 1.6 has now been released. Happy deleting code everybody! |
What does this PR do?
Fixes #<issue_number>
Does your PR introduce any breaking changes? If yes, please list them.
Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃
cc @tchaton @rohitgr7 @akihironitta @justusschock @kaushikb11 @awaelchli @Borda @ananthsub @ninginthecloud @jjenniferdai