Closed Angryrou closed 1 year ago
I didn't get the warning when running sample code for pytorch_lightning
using PyTorch 1.12.1
. (This code was made due to #8) Your problem is probably caused by a misuse. Could you try the official example in your PyTorch environment?
Thanks! After refactoring my code to align with the official example, my problem has been solved. You are perfectly right.
Hi Tony, I got a similar warning as #5 on using
warmup.UntunedLinearWarmup
after I upgraded my Pytorch to 1.12.1_UserWarning: Detected call of
lr_scheduler.step()
beforeoptimizer.step()
. In PyTorch 1.1.0 and later, you should call them in the opposite order:optimizer.step()
beforelr_scheduler.step()
. Failure to do this will result in PyTorch skipping the first value of the learning rate schedule. See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate_Would you help double-check whether I can still ignore the warning in my pytorch version?