Skip to content

Commit 3b0052f

Browse files
committed
fix: test_schedule_free_methods
1 parent 3555be2 commit 3b0052f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test_optimizers.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ def _closure() -> float:
180180
def test_init_group(optimizer_config):
181181
optimizer_class, *_ = optimizer_config
182182

183+
optimizer_name: str = optimizer_class.__name__.lower()
184+
if optimizer_name.startswith('build'):
185+
pytest.skip(f'skip {optimizer_name}')
186+
183187
optimizer_class([simple_parameter()], num_iterations=1).init_group({'params': [], 'betas': (0.0, 0.0)})
184188

185189

@@ -399,9 +403,7 @@ def test_dynamic_scaler():
399403
scaler.update_scale(overflow=False)
400404

401405

402-
@pytest.mark.parametrize(
403-
'optimizer_name', ['ScheduleFreeAdamW', 'ScheduleFreeSGD', 'ScheduleFreeAdan', 'ScheduleFreeRAdam']
404-
)
406+
@pytest.mark.parametrize('optimizer_name', ['ScheduleFreeAdamW', 'ScheduleFreeSGD', 'ScheduleFreeRAdam'])
405407
def test_schedule_free_methods(optimizer_name):
406408
optimizer = load_optimizer(optimizer_name)([simple_parameter(True)])
407409
optimizer.eval()

0 commit comments

Comments
 (0)