Logo
Explore Help
Register Sign In
mirrors/mmengine
1
0
Fork 0
You've already forked mmengine
mirror of https://github.com/open-mmlab/mmengine.git synced 2025-06-03 21:54:44 +08:00
Code Issues Projects Releases Wiki Activity
mmengine/tests/test_hook/test_sync_buffers_hook.py

14 lines
312 B
Python
Raw Normal View History

[Feature] Add Sync Buffer Hook (#57) * [Feature]: Add Part3 of Hooks * [Feature]: Add Hook * [Fix]: Add docstring and type hint for base hook * add sync buffer hook * update typing hint and docs * fix lint * fix mypy * fix lint * use mock from unittest Co-authored-by: seuyou <3463423099@qq.com>
2022-03-03 17:13:43 +08:00
# 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()
[Refactor] Refactor the interfaces of Hook and its subclassed (#117) * Fix hook * Fix * Fix docs * FIx * Fix * Fix as comment * update * Fix hook * Fix hook * Fix hook * Fix itertimerhook * Fix iter_timer_hook * Fix * Fix * fix logger hook * Fix loggerhook * update cur_dataloader * Fix docstring * Fix docstring * Fix as commet * Fix as commet * Fix as comment * rename is_last_epoch, enhance and add after_val before_val .etc * fix typo in docstring * remove resolved TODO * refactor docstring
2022-03-13 16:48:09 +08:00
Hook._after_epoch(Runner)
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 880ms Template: 13ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API