mmengine/tests/test_hook/test_sync_buffers_hook.py
RangiLyu 9a61b389e7
[Refactor] Add batch_idx to hook input. (#140)
* [Refactor] Add batch_idx to hook input.

* update
2022-03-29 11:40:38 +08:00

14 lines
312 B
Python

# Copyright (c) OpenMMLab. All rights reserved.
from unittest.mock import Mock
from mmengine.hooks import SyncBuffersHook
class TestSyncBuffersHook:
def test_sync_buffers_hook(self):
runner = Mock()
runner.model = Mock()
hook = SyncBuffersHook()
hook._after_epoch(runner)