Commit Graph

229 Commits (e470c3aa1b5f457de9948ae1c4733ed09155f8e7)
 

Author SHA1 Message Date
RangiLyu ba6b06100c
fix nested build function calls (#244) 2022-05-21 14:41:08 +08:00
RangiLyu 11688507ba
[Fix] Fix some bugs in hooks and runner. (#242)
* [Fix] Fix some bugs in hooks and runner.

* fix markdown

* fix latex formula

* resolve comments
2022-05-20 17:18:24 +08:00
RangiLyu 0279ac2e8d
[Feature] Support EMA and SWA. (#239)
* [Feature] Support EMA and SWA.

* add ema hook

* add avg model ut

* add more unit tests

* resolve comments

* fix warmup ema

* rename

* fix comments

* add assert

* fix typehint

* add comments
2022-05-19 18:53:04 +08:00
Zaida Zhou 86ffc19c9c
Add pyupgrade pre-commit hook (#232)
* Add pyupgrade pre-commit hook

* fix ut

* remove comments
2022-05-19 17:56:31 +08:00
Zaida Zhou 98c85529b1
[Refactor] Replace torch distributed with mmengine dist module (#196)
* [Fix] Replace torch distributed with mmengine dist module

* minor refinement

* move all_reduce_params to dist.py

* add unit tests

* update unit tests

* fix test_logger.py

* add examples
2022-05-19 17:40:01 +08:00
RangiLyu e37f1f905b
[Refactor] Make loop-related attributes to be runner's properties. (#236)
* [Enhance] Make loop related attributes to be runner's properties.

* move iter and epoch to loop

* resolve comments
2022-05-18 22:35:10 +08:00
Mashiro cc8a6b86e1
[Fix] Fix BaseDataset: join prefix in parse_data_info (#226)
* implement parse_data_info

* add unit test

* fix join prefix of ann_file

* fix docstring
2022-05-17 20:53:13 +08:00
Zaida Zhou f5867f8442
Replace markdownlint with mdformat to avoid installing ruby (#233)
* Replace markdownlint with mdformat to avoid installing ruby

* fix circleci
2022-05-17 20:52:22 +08:00
Mashiro fd962437e9
[Fix] Support Runner dump cfg without filename (#228)
* fix runner dump cfg

* convert dict cfg to Config
2022-05-17 17:32:10 +08:00
Zaida Zhou 84e60f6463
Replace the URL of flake8 in .pre-commit-hook.yml (#231)
* pull flake8 from github

* pull flake8 from github
2022-05-17 17:30:01 +08:00
liukuikun 689837d2b8
[Enhancement] add pixel data and label data (#224) 2022-05-13 18:23:25 +08:00
Zaida Zhou 63ea47460c
[Refactor] Change Runner.build_dataloader to a static method (#219)
* [Refactor] Change some methods to static methods

* only change build_dataloader to static method
2022-05-12 18:36:44 +08:00
RangiLyu 1912660db9
[Feature] Support convert epoch-based schedulers to iter-based. (#221)
* [Feature] Support convert epoch-based schedulers to iter-based.

* Support convert and refactor LR and Momentum to mixin.

* Add unit tests

* fix args and add runner ut

* resolve comments
2022-05-10 15:17:51 +08:00
Tao Gong 92b94e8e60
[Docs] Add docs for custom dataset wrapper (#222)
* add docs for custom dataset wrapper

* Update basedataset.md
2022-05-10 15:14:39 +08:00
Yining Li 22d3b04575
fix collections.abc compatibility (#227) 2022-05-10 15:08:51 +08:00
Mashiro 9087956f70
[Enhance] Update config with newest mmcv and show custom imports error explicitly (#192)
* add import error information

* Update config with newest mmcv

* add empty line to test config
2022-05-06 22:59:54 +08:00
Mashiro 859f4d1580
[Fix] Fix some code and docstring in LogProcessor and LoggerHook (#213)
* fix logger hook

* fix to record multi-level logs, log train/a/b to a/b

* fix loggerhook json path

* fix uunit test

* change runner.train_dataloader to runner.train_loop.dataloader

* clean debug code

* refie comments and docstring

* fix unit test
2022-05-06 14:33:33 +08:00
liukuikun 5c5c03e648
[Enchance] cat empty instancedata, support torch.bool for more type (#209)
* refactor instancedata

* fix docs

* fix comment
2022-05-06 14:00:51 +08:00
Zaida Zhou 16058fdb18
[Fix] Fix RecursionError when key is invalid (#220)
* [Fix] Fix RecursionError when key is invalid

* refine comments
2022-05-05 20:09:03 +08:00
Mashiro 5007825619
[Fix] change CheckPointHook before_run to before train (#214)
* change CheckPointHook before_run to before train

* using tmp_path in each checkpointhook test case
2022-05-05 20:08:07 +08:00
Zaida Zhou a1adbff11e
[Enhancement] Get local_rank in init_dist_mpi from env (#212) 2022-05-05 19:55:54 +08:00
RangiLyu 0c59eeab5f
[Enhance] Refine registry logging info. (#206)
* [Enhance] Refine registry logging info.

* update

* fix
2022-05-05 17:53:34 +08:00
RangiLyu 4742544b25
[Feature] Support collect all registered module info. (#193)
* [Feature] Support collect all registered module info.

* update

* update

* add unit tests

* add to runner

* resolve comments
2022-05-05 11:59:51 +08:00
Mashiro 2da59bb1b9
fix build visualizer (#217) 2022-04-29 21:53:04 +08:00
RangiLyu 29342c4eb2
[Fix] Fix to_dict in BaseDataElement and add metainfo property. (#215)
* [Fix] Fix to_dict in BaseDataElement and add metainfo property.

* Update mmengine/data/base_data_element.py

Co-authored-by: liukuikun <24622904+Harold-lkk@users.noreply.github.com>

Co-authored-by: liukuikun <24622904+Harold-lkk@users.noreply.github.com>
2022-04-29 10:19:19 +08:00
Mashiro 05fd5e81a3
[Enhance] Refine MMLogger and change save dir of MMLogger and Visualizer (#205)
* MMLogger can call get_current_instance without get_instance, change log path

* fix docstring

* fix docstring and update UT

* Fix runner

* fix docstring and lint

* fix ut below python3.8

* resolve circle import
2022-04-27 20:47:14 +08:00
liukuikun 2475c7a053
Add docstrings (#204) 2022-04-27 19:53:47 +08:00
RangiLyu b1a275a14a
improve the coverage of docstring (#203)
* improve the coverage of docstring

* update
2022-04-27 19:53:06 +08:00
Mashiro db2b45b7ac
[Fix] Fix the probable failure of the basedataset unit test (#210) 2022-04-27 19:48:28 +08:00
Tao Gong 8668c14d25
remove ann_file arg in load_ann_list (#211) 2022-04-27 19:47:49 +08:00
Zaida Zhou 17dbac1812
[Enhancement] Handle the device type of inputs in functions (#137)
* [Enhancement] Handle the device type of inputs in functions

* rename and move three fucntions to dist/utils.py

* minor refinement

* rename dist to torch_dist in utils.py

* update unit tests

* refine unit tests

* add unit tests

* fix unit tests

* replace Sequence with list and tuple

* rename get_backend_device to get_comm_device

* fix unit tests

* fix unit tests

* refactor and add more unit tests

* cast_data_device does not support set type
2022-04-27 19:46:13 +08:00
Zaida Zhou 661e759063
[Fix] param_scheduler can not None when training models (#208)
* [Fix] param_scheduler can not None when training models

* update unit tests

* fix unit tests

* refactor ParamSchedulerHook

* refactor unit tests

* param_schedulers can be an empty list
2022-04-27 19:45:27 +08:00
Haian Huang(深度眸) 6996bdc892
Update visualizer code (#184)
* update vis backend

* update vis backend

* update vis backend

* update visualizer

* update visualizer

* update visualizer

* update featmap

* update featmap

* update visualizer and unitest

* add draw points unitest and refactor vis_backend

* fix typo and close unitest

* fix comment

* add docstring

* fix comment

* add master only

* fix comment

Co-authored-by: liukuikun <641417025@qq.com>
2022-04-27 19:44:40 +08:00
Mashiro 452b3656a1
[Fix] Fix dump config without self.filename (#202)
* fix config

* add docstring and unit test

* update tutorial

* update tutorial

* fix markdown format

* fix markdown format
2022-04-27 19:43:12 +08:00
Mashiro 4dcbd269aa
[Enhance] register dataset wrapper (#185)
* register dataset wrapper

* fix as comment
2022-04-26 16:52:13 +08:00
Wenwei Zhang 3c8806e4c6
Add docs about get started (#197)
* add docs about get started

* refine
2022-04-26 13:56:23 +08:00
Wenwei Zhang 5c3b8e456c
Merge Adaptation branch to main branch 2022-04-26 13:54:05 +08:00
Wenwei Zhang 96f3d97fc4
Try to fix lint issue (#199)
* try to fix lint

* upgrade yapf version

* use another way to bypass yapf

* update docstring
2022-04-26 13:53:00 +08:00
HAOCHENYE 9d0d7536c8 merge main 2022-04-26 10:38:57 +08:00
Mashiro e0d00c5bdd
[Fix] resolve conflict betweem adapt and main. (#198)
* [Docs] Refine registry documentation (#186)

* [Docs] Refine registry documentation

* reslove comments

* minor refinement

* Refine Visualizer docs (#177)

* Refine Visualizer docs

* update

* update

* update featmap

* update docs

* update visualizer docs

* [Refactor] Refine LoggerHook (#155)

* rename global accessible and intergration get_sintance and create_instance

* move ManagerMixin to utils

* fix as docstring and seporate get_instance to get_instance and get_current_instance

* fix lint

* fix docstring, rename and move test_global_meta

* rename LogBuffer to HistoryBuffer, rename MessageHub methods, MessageHub support resume

* refine MMLogger timestamp, update unit test

* MMLogger add logger_name arguments

* Fix docstring

* Add LogProcessor and some unit test

* update unit test

* complete LogProcessor unit test

* refine LoggerHook

* solve circle import

* change default logger_name to mmengine

* refactor eta

* Fix docstring comment and unitt test

* Fix with runner

* fix docstring

fix docstring

* fix docstring

* Add by_epoch attribute to LoggerHook and fix docstring

* Please mypy and fix comment

* remove \ in MMLogger

* Fix lint

* roll back pre-commit-hook

* Fix hook unit test

* Fix comments

* remove \t in log and add docstring

* Fix as comment

* should not accept other arguments if corresponding instance has been created

* fix logging ddp file saving

* fix logging ddp file saving

* move log processor to logging

* move log processor to logging

* remove current datalaoder

* fix docstring

* fix unit test

* add learing rate in messagehub

* Support output training/validation/testing message after iterations/epochs

* fix docstring

* Fix IterBasedRunner log string

* Fix IterBasedRunner log string

* Support parse validation loss in log processor

* [Enhancement] Add PolyParamScheduler, PolyMomentum and PolyLR (#188)

* [Enhancement] Add PolyParamScheduler, PolyMomentum and PolyLR

* min_lr -> eta_min, refined docstr

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Haian Huang(深度眸) <1286304229@qq.com>
Co-authored-by: Tong Gao <gaotongxiao@gmail.com>
2022-04-26 00:37:16 +08:00
Tong Gao c3aff4fc9a
[Enhancement] Add PolyParamScheduler, PolyMomentum and PolyLR (#188)
* [Enhancement] Add PolyParamScheduler, PolyMomentum and PolyLR

* min_lr -> eta_min, refined docstr
2022-04-25 13:44:15 +08:00
Mashiro e2a2b0438e
[Refactor] Refine LoggerHook (#155)
* rename global accessible and intergration get_sintance and create_instance

* move ManagerMixin to utils

* fix as docstring and seporate get_instance to get_instance and get_current_instance

* fix lint

* fix docstring, rename and move test_global_meta

* rename LogBuffer to HistoryBuffer, rename MessageHub methods, MessageHub support resume

* refine MMLogger timestamp, update unit test

* MMLogger add logger_name arguments

* Fix docstring

* Add LogProcessor and some unit test

* update unit test

* complete LogProcessor unit test

* refine LoggerHook

* solve circle import

* change default logger_name to mmengine

* refactor eta

* Fix docstring comment and unitt test

* Fix with runner

* fix docstring

fix docstring

* fix docstring

* Add by_epoch attribute to LoggerHook and fix docstring

* Please mypy and fix comment

* remove \ in MMLogger

* Fix lint

* roll back pre-commit-hook

* Fix hook unit test

* Fix comments

* remove \t in log and add docstring

* Fix as comment

* should not accept other arguments if corresponding instance has been created

* fix logging ddp file saving

* fix logging ddp file saving

* move log processor to logging

* move log processor to logging

* remove current datalaoder

* fix docstring

* fix unit test

* add learing rate in messagehub

* Support output training/validation/testing message after iterations/epochs

* fix docstring

* Fix IterBasedRunner log string

* Fix IterBasedRunner log string

* Support parse validation loss in log processor
2022-04-24 19:23:28 +08:00
Haian Huang(深度眸) 4274679376
Refine Visualizer docs (#177)
* Refine Visualizer docs

* update

* update

* update featmap

* update docs

* update visualizer docs
2022-04-24 19:21:10 +08:00
Zaida Zhou 7e123ad6d6
[Docs] Refine registry documentation (#186)
* [Docs] Refine registry documentation

* reslove comments

* minor refinement
2022-04-22 20:45:13 +08:00
Wenwei Zhang fb7d8ccd6b
Manually fully initialize the dataset in runner when building dataloader (#190)
* full init the dataset when building data loader

* resolve comments
2022-04-22 20:44:52 +08:00
ZwwWayne 4f5c0cd273 Merge branch 'main' of github.com:open-mmlab/mmengine into adapt 2022-04-22 13:52:48 +08:00
Tao Gong a3b8d4ea56
Refactor docs of basedataset (#175)
* refactor docs of basedataset

* fix ci

* fix comments

* fix comments

* fix comments

* fix comments

* fix comments

* set default value of ann_file to ''

* fix comments
2022-04-22 13:51:57 +08:00
ZwwWayne ae3b857480 Merge branch 'adapt' of github.com:open-mmlab/mmengine into adapt 2022-04-22 13:48:14 +08:00
Yining Li d2e4c6b683
[Doc] Update docs of metrics and evaluator (#183)
* update docs of metrics and evaluator

* rename file

* resolve comments
2022-04-22 13:02:04 +08:00
Mashiro 82a313d09b
[Enhancement] Refine logging. (#148)
* rename global accessible and intergration get_sintance and create_instance

* move ManagerMixin to utils

* fix as docstring and seporate get_instance to get_instance and get_current_instance

* fix lint

* fix docstring, rename and move test_global_meta

* rename LogBuffer to HistoryBuffer, rename MessageHub methods, MessageHub support resume

* refine MMLogger timestamp, update unit test

* MMLogger add logger_name arguments

* Fix docstring

* change default logger_name to mmengine

* Fix docstring comment and unitt test

* fix docstring

fix docstring

* fix docstring

* Fix lint

* Fix hook unit test

* Fix comments

* should not accept other arguments if corresponding instance has been created

* fix logging ddp file saving

* fix logging ddp file saving

* fix docstring

* fix unit test

* fix docstring as comment
2022-04-21 19:12:10 +08:00