def set_hooks(self, hooks: List['ClassyHook']):
    'Set hooks for task\n\n        Args:\n            hooks: List of hooks to apply during training\n        '
    from classy_vision.hooks import ClassyHook
    assert isinstance(hooks, list)
    assert all((isinstance(hook, ClassyHook) for hook in hooks))
    assert (len({hook.name() for hook in hooks}) == len(hooks)), 'Cannot have repeated hooks of the same class'
    non_checkpoint_hooks = [hook for hook in hooks if (not isinstance(hook, CheckpointHook))]
    checkpoint_hooks = [hook for hook in hooks if isinstance(hook, CheckpointHook)]
    hooks = (non_checkpoint_hooks + checkpoint_hooks)
    self.hooks = hooks
    return self
Set hooks for task

Args:
    hooks: List of hooks to apply during training
def set_hooks(self, hooks: List['ClassyHook']):
    'Set hooks for task\n\n        Args:\n            hooks: List of hooks to apply during training\n        '
    from classy_vision.hooks import ClassyHook
    assert isinstance(hooks, list)
    assert all((isinstance(hook, ClassyHook) for hook in hooks))
    assert (len({hook.name() for hook in hooks}) == len(hooks)), 'Cannot have repeated hooks of the same class'
    non_checkpoint_hooks = [hook for hook in hooks if (not isinstance(hook, CheckpointHook))]
    checkpoint_hooks = [hook for hook in hooks if isinstance(hook, CheckpointHook)]
    hooks = (non_checkpoint_hooks + checkpoint_hooks)
    self.hooks = hooks
    return self