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

PyTorch classes that check torch.optim.lr_scheduler._LRScheduler #2389

Open
ndronen opened this issue Jan 28, 2024 · 1 comment
Open

PyTorch classes that check torch.optim.lr_scheduler._LRScheduler #2389

ndronen opened this issue Jan 28, 2024 · 1 comment
Projects
Milestone

Comments

@ndronen
Copy link

ndronen commented Jan 28, 2024

In semi-recent versions of PyTorch, learning rate scheduler classes are no longer subclasses of _LRScheduler. They are now subclasses of LRScheduler. There are multiple references to _LRScheduler in ART (e.g. in the TRADES trainer). The references are now obsolete and lead to ValueError being raised even with a valid instance of a PyTorch LR scheduler.

Running adversarial_training_trades.py with PyTorch 2.0.1 should be sufficient to reproduce the problem.

I would recommend changing the ART code to just check whether the argument has a step attribute. It would be simplest that way.

@beat-buesser
Copy link
Collaborator

Hi @ndronen Thank you very much for the notification. We'll take a look and include it in our future releases. Please let me know if you are interested to work on this issue.

@beat-buesser beat-buesser added this to the ART 1.18.0 milestone Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
ART 1.18.0
Awaiting triage
Development

No branches or pull requests

2 participants