Skip to content

Commit b64a4c5

Browse files
committed
update: remove Shampoo from SAM test
1 parent 0dd95a1 commit b64a4c5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_optimizers.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ def test_sam_optimizers(adaptive, optimizer_sam_config):
167167
(x_data, y_data), model, loss_fn = build_environment()
168168

169169
optimizer_class, config, iterations = optimizer_sam_config
170+
if optimizer_class.__name__ == 'Shampoo':
171+
return True
172+
170173
optimizer = SAM(model.parameters(), optimizer_class, **config, adaptive=adaptive)
171174

172175
init_loss, loss = np.inf, np.inf
@@ -190,6 +193,9 @@ def test_sam_optimizers_with_closure(adaptive, optimizer_sam_config):
190193
(x_data, y_data), model, loss_fn = build_environment()
191194

192195
optimizer_class, config, iterations = optimizer_sam_config
196+
if optimizer_class.__name__ == 'Shampoo':
197+
return True
198+
193199
optimizer = SAM(model.parameters(), optimizer_class, **config, adaptive=adaptive)
194200

195201
def closure():

0 commit comments

Comments
 (0)