Skip to content

Commit 7a5ca65

Browse files
committed
update: test_update_frequency
1 parent 45fe685 commit 7a5ca65

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_optimizer_parameters.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ def test_reduction(optimizer_names):
123123
PCGrad(optimizer, reduction='wrong')
124124

125125

126+
@pytest.mark.parametrize('optimizer_names', ['shampoo'])
127+
def test_update_frequency(optimizer_names):
128+
with pytest.raises(ValueError):
129+
load_optimizers(optimizer_names)([None], update_freq=0)
130+
131+
126132
def test_sam_parameters():
127133
with pytest.raises(ValueError):
128134
SAM(None, load_optimizers('adamp'), rho=-0.1)

0 commit comments

Comments
 (0)