We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7adad14 commit e30a504Copy full SHA for e30a504
tests/tests_pytorch/trainer/optimization/test_optimizers.py
@@ -703,7 +703,7 @@ def configure_optimizers(self):
703
704
# Calculate the total number of steps (iterations) and expected scheduler calls
705
total_steps = 7 * 3 # Total iterations (7 batches per epoch * 3 epochs)
706
- expected_steps = total_steps // 5 # Scheduler steps every 5 iterations
+ expected_steps = (total_steps-1) // 5 # Scheduler steps every 5 iterations
707
708
# Assert that the scheduler was called the expected number of times
709
assert mocked_sched.call_count == expected_steps
0 commit comments