File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
tests/tests_pytorch/tuner Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -622,9 +622,6 @@ def test_gradient_correctness():
622622def test_lr_finder_callback_applies_lr_after_restore (tmp_path ):
623623 """LearningRateFinder used as a callback should apply its suggested LR to the optimizer used after state
624624 restoration.
625-
626- This currently fails: the LR is set during the search but lost after restore.
627-
628625 """
629626
630627 import torch .nn as nn
@@ -681,7 +678,7 @@ def configure_optimizers(self):
681678 )
682679
683680 trainer .fit (model , train_loader )
684-
681+ assert model . hparams . lr is not None
685682 # Ensure LR Finder produced a suggestion for this setup; if not, the test can't assert application
686683 assert lr_finder_cb .optimal_lr is not None , "LR Finder should have computed results"
687684 suggestion = lr_finder_cb .optimal_lr .suggestion ()
You can’t perform that action at this time.
0 commit comments