Skip to content

Commit f775e35

Browse files
authored
Hotfix for CI (#21063)
1 parent 4ff8ff7 commit f775e35

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/tests_pytorch/tuner/test_lr_finder.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,9 @@ def configure_optimizers(self):
599599

600600
# Verify learning rate finder ran and has results
601601
assert lr_finder_callback.optimal_lr is not None, "Learning rate finder should have results"
602-
assert lr_finder_callback.optimal_lr.suggestion() > 0, "Learning rate suggestion should be positive"
602+
suggestion = lr_finder_callback.optimal_lr.suggestion()
603+
if suggestion is not None:
604+
assert suggestion > 0, "Learning rate suggestion should be positive"
603605

604606

605607
def test_gradient_correctness():

0 commit comments

Comments
 (0)