Commit Graph

115 Commits (ab8b51682f8acf0a8413eb75db12dc10d6d78b81)
 

Author SHA1 Message Date
RangiLyu ab8b51682f
[Fix] Init weights after build model. (#164)
* [Fix] Init weights after build model.

* add unit tests and docstring
2022-04-05 17:44:59 +08:00
ZwwWayne 87da7599ae Merge branch 'main' into adapt 2022-04-01 19:46:41 +08:00
RangiLyu 2d80367893
[Refactor] Refactor Evaluator to Metric. (#152)
* [Refactor] Refactor Evaluator to Metric.

* update

* fix lint

* fix doc

* fix lint

* resolve comments

* resolve comments

* remove collect_device from evaluator

* rename
2022-04-01 15:06:38 +08:00
Mashiro 2fdca03f19
[Enhancement] Support get sub dataset and rename method and variable. (#145)
* add get_subset method, add comment, rename variable

* add unit test

* Please mypy

* Fix as comment, support negative index, and fix index access error

* add and refine docstring, handle indices=0

* handle indices=0

* add empty list indices test

* rename in_meta in docstring and comments to in_metainfo

* clean meta nameing

* Fix negative indices error

* test empty list of get_subset

* fix comments and docstring

* add unit test

* Fix as comment

* Fix as comment

* add docstring to mention wrapped dataset should not inherit from Basedataset

* Fix wrapped dataset docstring

* Fix wrapped dataset docstring

* Fix method name, docstring, and comments

* Fix comments

* Fix comments

* Fix comments
2022-04-01 14:51:11 +08:00
ZwwWayne a39d959eeb Merge branch 'main' into adapt 2022-04-01 13:08:39 +08:00
Zaida Zhou 8b4d7ddaa2
Add circleci (#157)
* Add circleci

* fix typo

* lower required coverage

* support initialzing distributed environemtn without GPUs

* fix unit tests

* add approval for running gpu tests

* add approval for running gpu tests

* fix unit tests

* fix unit tests
2022-04-01 13:07:29 +08:00
Zaida Zhou 0ca54eb71b
[Fix] Fix unit tests when gpu is not available (#163) 2022-04-01 12:50:15 +08:00
RangiLyu 25014af3c3
[Refactor] Refactor default_scope in Registry. (#158) 2022-04-01 09:13:55 +08:00
Haian Huang(深度眸) dc594e75bf
[Feature] Add InstanceData (#160)
* [Enhancement] refactor base data elment

* fix comment

* fix comment

* fix pop not existing key without error

* add instance_data

* update

* refine code

* add refer

Co-authored-by: liukuikun <641417025@qq.com>
2022-03-31 23:30:00 +08:00
Zaida Zhou e80267ae06
[Fix] Fix unit tests of evaluator (#162) 2022-03-31 23:25:50 +08:00
Zaida Zhou 1927bc7726
fix typo (#161) 2022-03-31 18:29:45 +08:00
liukuikun 7e246b6f65
[Enhancement] refactor base data element (#143)
* [Enhancement] refactor base data elment

* fix comment

* fix comment

* fix pop not existing key without error
2022-03-31 18:21:45 +08:00
Zaida Zhou cf0363141a
Update pytest.ini (#156) 2022-03-30 23:26:12 +08:00
Zaida Zhou f1de071cf0
[Enhancement] Refactor Runner (#139)
* [Enhancement] Rename build_from_cfg to from_cfg

* refactor build_logger and build_message_hub

* remove time.sleep from unit tests

* minor fix

* move set_randomness from setup_env

* improve docstring

* refine comments

* print a warning information

* refine comments

* simplify the interface of build_logger
2022-03-30 14:26:40 +08:00
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
Mashiro 563b4bad16
[Feature] add defaut scope (#149)
* add defaut scope

* Fix docstring

* override get_current_instance method in DefaultScope

clean meta nameing

* remove default mmengine argument of DefaltScope

remove default mmengine argument of DefaltScope

remove default mmengine argument of DefaltScope

* Fix unit test

Fix unit test

* Fix example in docstring

* add explaination of DefaultScope
2022-03-28 23:14:41 +08:00
Mashiro 1048584147
[Enhancement] Refine GlobalAccessble (#144)
* 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

* fix manager's runtime error description

fix manager's runtime error description

* Add comments

* Add comments
2022-03-26 21:21:25 +08:00
Zaida Zhou 2bf099d33c
[Feature] Add MultiProcessTestCase (#136)
* [Enhancement] Provide MultiProcessTestCase to test distributed related modules

* remove debugging info

* add timeout property
2022-03-26 20:38:25 +08:00
Yuan Liu 26f24296db
[Feature]: Add dist semantics in checkpoint hook (#131)
* [Feature]: Add dist semantics in checkpoint hook

* [Fix]: Delete sync buffer in checkpoint hook
2022-03-25 13:46:31 +08:00
Zaida Zhou e4859030af
[Docs] Update registry documentation (#133) 2022-03-25 11:29:34 +08:00
Zaida Zhou aee6d7a769
[Docs] Improve type hint style (#125) 2022-03-25 11:26:05 +08:00
Zaida Zhou 248ad9aee8
[Feature] Add Runner and Loop (#86)
* [Feature] Add Runner and Loop

* refine docstring

* refine docstring

* refine __init__ of Runner

* add Runner.save_checkpoint

* add comment for data_batch

* rename validation_cfg to val_cfg

* update branch

* update branch

* discard wear reference

* set seed for torch in dataloader worker

* refine comments

* reorder methods

* import module in __init__.py

* add runner.load_checkpoint

* rename attributes

* fix indent

* fix indent

* add comment for LOOPS

* add example for methods

* add example for methods

* refine examples

* add Runner.resume and refactor register_hooks

* remove type hint of runner in CheckpointHook

* rename before_run to before_train

* remove collate

* add before_run after_run for loop.run

* dummy collate_fn

* add more unit tests

* move call_hook('before_run') to runner

* minor fix

* add comments for collate_fn

* fix type hint

* refactor logic to load or resume checkpoint

* fix typo

* add comments for IterBasedTrainLoop

* refactor unit tests

* fix unit tests

* refactor

* fix setup_env

* refine

* minor fix

* Merge branch 'main' of github.com:open-mmlab/mmengine into zzd/add-runner

* minor fix

* minor fix

* refine

* refactor unit tests

* fix unit tests

* add launcher property

* add logger, message_hub and writer unit tests

* add cur_dataloader attribute for runner

* fix IterBasedTrainLoop

* add torch.no_grad decorator

* add master_only decorator for save_checkpoint

* add before_test_epoch in TestLoop

* refactor load_or_resume method

* refine docstring

* fix typo

* build_dataloader can handle dataset object

* add dump_config for runner

* collate_fn should not a lambda function

* minor fix

* refine docstring

* fix unit tests

* improve comments

* refine unit tests

* rename collate_fn to pseduo_collate

* add 'TODO' tag
2022-03-14 13:19:29 +08:00
Zaida Zhou b3d54481fd
[Fix] Fallback to use self registry if default_scope not found (#122) 2022-03-14 00:44:16 +08:00
Zaida Zhou 72cf410969
[Refactor] Refactor interface of checkpointhook (#127)
* [Refactor] Refactor interface of checkpointhook

* fix print format

* minor ifx
2022-03-13 23:39:28 +08:00
Mashiro fff4742e0b
[Enhancement] Messagehub supports update dict logs. (#120)
* Messagehub support update dict values

* Messagehub support update dict values

* fix assertion error message
2022-03-13 21:28:47 +08:00
Zaida Zhou f548c81846
[Enhancement] Handle tensor device type in sync_random_seed (#126) 2022-03-13 17:45:02 +08:00
Zaida Zhou 6d73b6cdf2
[Refactor] Use mmengine distributed in evaluator (#123)
* [Refactor] Use mmengine distributed in evaluator

* remove 'TODO' comment
2022-03-13 16:58:23 +08:00
Mashiro 4d49de7d81
[Fix] Fix LoggerHook save mutiple ranks scalar in the same json file. (#124)
* use master_only to decorator _log_train and _log_val

* fix resoloved TODO

fix resoloved TODO

fix resoloved TODO

* fix raise error typo

* ensure log item is python scalar
2022-03-13 16:56:29 +08:00
Mashiro a7961407e4
[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
Yuan Liu 755f8b5b59
[Refactor]: Change scheduler to param_scheduler (#121)
* [Refactor]: Change scheduler to param_scheduler

* [Fix]: Fix UT of param scheduler hook

Co-authored-by: Your <you@example.com>
2022-03-12 10:47:06 +08:00
Yining Li 61fecabea6
[Feature] Update evaluator prefix (#114)
* update evaluator prefix

* update docstring and comments

* update doc
2022-03-10 17:25:20 +08:00
liukuikun 3e0c064f49
[Feature] NaiveVisualizationHook (#98)
* [WIP] testvisualizationhook

* add TestNaiveVisualizationHook

* fix comment

* unpad

* batch imdenormalize

* fix comment

* fix comment
2022-03-10 17:22:31 +08:00
Mashiro 02ceaedb82
[Enhancement] Config support deep copy (#116)
* Config support deep copy

* Fix end of line
2022-03-10 16:01:18 +08:00
Mashiro ec3034b765
[Fix] Fix output argument of after_iter, train_after_ter and val_after_iter (#115)
* Fix hook

* Fix

* Fix docs

* FIx

* Fix

* Fix as comment
2022-03-09 23:10:19 +08:00
liukuikun 3bdd27c4e2
[Fix] add required lib for vis (#111)
* add required lib for vis

* fix comment
2022-03-09 22:11:05 +08:00
Haian Huang(深度眸) 98097bb73e
[Update] Refine visualization docs (#107)
* refine visualization

* refine visualization

* epdate

* update

* update

* update

* fix comment
2022-03-09 20:43:29 +08:00
Mashiro 2e4ae21f2b
Fix test_get_max_memory (#113) 2022-03-09 14:05:25 +08:00
RangiLyu c499d72691
fix evaluator unit test (#112) 2022-03-08 20:07:32 +08:00
Mashiro 6f69039ca9
[Feature] Add LoggerHook (#77)
* add logger hook

* update

* update

* update test

* update

* update test

* update

* update

* update

* update

* update

* Add logger hook

* Fix pre-commit

* Fix as comment

* Fix as comment

* Fix as comment

* Fix as comment

* Fix as comment

* Fix bytes

* update

* Fix as comment

* Fix as comment

* Update runner

* Fix as comment

* Fix as comment

* Fix as comment

* Fix as comment
2022-03-08 16:10:30 +08:00
RangiLyu 49b7d0ce6f
Support default_scope when building optimizer and evaluator. (#109)
* Support default_scope when building optimizer and evaluator.

* add docstring

* fix

* fix
2022-03-08 16:05:29 +08:00
RangiLyu be6f18988e
Update type hint and unit tests of evaluator. (#110)
* update type hint and ut for evaluator

* update doc

* fix
2022-03-08 16:04:46 +08:00
Yining Li cfccabc657
[Feature] Support metric prefix in BaseEvaluator (#82)
* support metric prefix in BaseEvaluator

* update docs

* use class attribute default_prefix
2022-03-08 15:12:11 +08:00
Haian Huang(深度眸) 824be950b9
Add writer (#74)
* add writer

* update

* update

* update docstr

* update unittest

* update unittest

* fix comment

* update unittest

* fix comment

* fix comment

* fix comment

* fix comment

* update
2022-03-07 22:39:25 +08:00
liukuikun 7acaca1445
Visualizer (#67)
* [WIP] Visualizer

* add draw featmap

* update docstring

* update docstring

* update docstring

* fix comment

* fix comment

* fix comment

* fix comment

* fix comment
2022-03-07 22:06:32 +08:00
Tao Gong 5d441563d0
[Refactor]: Change _prepare_data() to prepare_data() in BaseDataset (#108) 2022-03-07 21:13:58 +08:00
Zaida Zhou ed8dcb4c61
fix type hint in hooks (#106) 2022-03-07 19:35:37 +08:00
Yining Li 9f0d1a9628
fix mmdet->mmengine in build.yml (#104) 2022-03-07 18:12:15 +08:00
Yuan Liu f8a4c31037
[Fix]: Change after inter and epoch to after train iter and epoch (#100)
* [Fix]: Change after inter and epoch to after train iter and epoch

* [Fix]: Add new UT to param scheduler hook

Co-authored-by: Your <you@example.com>
2022-03-07 14:01:23 +08:00
Yuan Liu be9971781e
[Fix]: Change the type of runner in docstring to Runner (#103)
* [Fix]: Change after inter and epoch to after train iter and epoch

* [Fix]: Add new UT to param scheduler hook

* [Fix]: Change the type of runner in docstring to Runner

Co-authored-by: Your <you@example.com>
2022-03-07 14:00:05 +08:00
Yuan Liu 15abb061ef
[Fix]: Fix data batch type in base hook (#99)
* [Fix]: Fix data batch type in base hook

* [Fix]: Fix the type hint bug in checkpoint, optimizer, param scheduler hooks

Co-authored-by: Your <you@example.com>
2022-03-07 13:25:45 +08:00