Skip to content

Commit

Permalink
Code format
Browse files Browse the repository at this point in the history
  • Loading branch information
mzr1996 committed May 11, 2021
1 parent 8db13b0 commit 858ab1f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_runner/test_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
from mmcv.runner import (CheckpointHook, EMAHook, IterTimerHook,
MlflowLoggerHook, PaviLoggerHook, WandbLoggerHook,
build_runner)
from mmcv.runner.hooks.hook import HOOKS, Hook
from mmcv.runner.hooks.lr_updater import (CosineRestartLrUpdaterHook,
OneCycleLrUpdaterHook,
StepLrUpdaterHook)
from mmcv.runner.hooks.hook import HOOKS, Hook


def test_checkpoint_hook():
Expand Down Expand Up @@ -124,8 +124,10 @@ def val_step(self, x, optimizer, **kwargs):


def test_custom_hook():

@HOOKS.register_module()
class ToyHook(Hook):

def __init__(self, info, *args, **kwargs):
super().__init__()
self.info = info
Expand Down Expand Up @@ -857,7 +859,6 @@ def _build_demo_runner(runner_type='EpochBasedRunner',
max_iters=None,
multi_optimziers=False):


log_config = dict(
interval=1, hooks=[
dict(type='TextLoggerHook'),
Expand Down

0 comments on commit 858ab1f

Please sign in to comment.