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

Use LRScheduler instead of _LRScheduler #2773

Closed
janeyx99 opened this issue Nov 14, 2022 · 1 comment · Fixed by #2780
Closed

Use LRScheduler instead of _LRScheduler #2773

janeyx99 opened this issue Nov 14, 2022 · 1 comment · Fixed by #2780

Comments

@janeyx99
Copy link

Update code to be compatible with LRScheduler too

I recently exposed LRScheduler to be public (instead of _LRScheduler) in pytorch/pytorch#88503. I see several instance checks in this current repo that use _LRScheduler, and I believe these should be updated to be LRScheduler.

Why?

This would be a good step in the right direction. Also, downstream users who subscribe to new LRScheduler (and not _LRScheduler) now will run into issues.

Alternatives

Maybe the best thing to do for forward and backward compatibility is to accept LRScheduler whenever there is _LRScheduler too.

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Nov 16, 2022

@janeyx99 thanks for the update! Indeed this change broke our CI running with pytorch-nightly :)

@vfdev-5 vfdev-5 self-assigned this Nov 16, 2022
vfdev-5 added a commit that referenced this issue Nov 16, 2022
vfdev-5 added a commit that referenced this issue Nov 16, 2022
* Fixed torch LRScheduler issue and fixed CI

Fixes #2773

* Fixed mypy issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants