PyTorch classes that check torch.optim.lr_scheduler._LRScheduler
ndronen opened this issue · 1 comments
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.
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.