Skip to content

Commit

Permalink
fix pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
HIT-cwh committed Oct 22, 2022
1 parent 290fec3 commit 839e003
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,14 @@ def test_ema_hook(self):
num_workers=0),
val_evaluator=evaluator,
work_dir=self.temp_dir.name,
default_scope='mmrazor',
optim_wrapper=OptimWrapper(
torch.optim.Adam(ToyModel().parameters())),
train_cfg=dict(by_epoch=True, max_epochs=2, val_interval=1),
val_cfg=dict(),
default_hooks=dict(logger=None),
custom_hooks=[dict(type='EMAHook', )],
experiment_name='test1')
experiment_name='test_func_outputs_deliver')
runner.train()
for hook in runner.hooks:
if isinstance(hook, EMAHook):
Expand Down
3 changes: 2 additions & 1 deletion tests/test_core/test_recorders/test_func_inputs_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,14 @@ def test_ema_hook(self):
num_workers=0),
val_evaluator=evaluator,
work_dir=self.temp_dir.name,
default_scope='mmrazor',
optim_wrapper=OptimWrapper(
torch.optim.Adam(ToyModel().parameters())),
train_cfg=dict(by_epoch=True, max_epochs=2, val_interval=1),
val_cfg=dict(),
default_hooks=dict(logger=None),
custom_hooks=[dict(type='EMAHook', )],
experiment_name='test1')
experiment_name='test_func_inputs_recorder')
runner.train()
for hook in runner.hooks:
if isinstance(hook, EMAHook):
Expand Down

0 comments on commit 839e003

Please sign in to comment.