Skip to content

Commit

Permalink
change to start_percent in test
Browse files Browse the repository at this point in the history
  • Loading branch information
wangg12 committed Jul 10, 2021
1 parent bf11606 commit 261794d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_runner/test_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ def test_flat_cosine_runner_hook(multi_optimziers, by_epoch):
multi_optimziers=multi_optimziers, max_epochs=max_epochs)

with pytest.raises(ValueError):
# start_pct: expected float between 0 and 1
FlatCosineAnnealingLrUpdaterHook(start_pct=-0.1, min_lr_ratio=0)
# start_percent: expected float between 0 and 1
FlatCosineAnnealingLrUpdaterHook(start_percent=-0.1, min_lr_ratio=0)

# add LR scheduler
hook_cfg = dict(
Expand All @@ -380,7 +380,7 @@ def test_flat_cosine_runner_hook(multi_optimziers, by_epoch):
warmup='linear',
warmup_iters=10 if by_epoch else 2,
warmup_ratio=0.9,
start_pct=0.5)
start_percent=0.5)
runner.register_hook_from_cfg(hook_cfg)
runner.register_hook_from_cfg(dict(type='IterTimerHook'))
runner.register_hook(IterTimerHook())
Expand Down

0 comments on commit 261794d

Please sign in to comment.