In 1.1 we made a major BC breaking change, where the order of calling lr schedulers should be changed from
for e in range(nepochs):
scheduler.step()
train()
to
for e in range(nepochs):
train()
scheduler.step()
This silently breaks many code, and makes it impossible to write consistent code for 1.0.1 and 1.1. So I propose to add a warning in scheduler.step where it looks at the corresponding optimizer, and checks if its .step has been called.
If it has not been called, this is a sign that the user is using scheduler.step() with the old pattern. I can't think of a reasonable case where this would detect a false positive.
In 1.1 we made a major BC breaking change, where the order of calling lr schedulers should be changed from
to
This silently breaks many code, and makes it impossible to write consistent code for 1.0.1 and 1.1. So I propose to add a warning in
scheduler.stepwhere it looks at the corresponding optimizer, and checks if its.stephas been called.If it has not been called, this is a sign that the user is using
scheduler.step()with the old pattern. I can't think of a reasonable case where this would detect a false positive.