jbwang1997
8f3fcee301
[Feature] Add auto scale lr fucntion ( #270 )
...
* Add auto scale lr fucntion
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
Co-authored-by: wangjiabao1.vendor <wangjiabao@pjlab.org.cn>
2022-06-06 22:27:15 +08:00
Jiazhen Wang
65bc95036c
[Enhance] Support Custom Runner ( #258 )
...
* support custom runner
* change build_runner_from_cfg
* refine docstring
* refine docstring
2022-06-06 14:33:32 +08:00
RangiLyu
70c4ea191f
[Refactor]: Modify val_interval and val_begin to be the attributes of TrainLoop. ( #274 )
...
* Modify val_interval and val_begin to be the attributes of TrainLoop.
* update doc
* fix lint
* type hint
2022-06-06 11:13:25 +08:00
Alex Yang
13606040ac
[Feat]:Add base module ( #277 )
2022-06-06 10:51:23 +08:00
Mashiro
80a46c4848
[Fix] fix build optimizer wrapper without type ( #272 )
...
* fix build optimizer wrapper without type
* refine logic
* fix as comment
* fix optim_wrapper config error in docstring and unit test
* refine docstring of build_optim_wrapper
2022-06-05 22:35:16 +08:00
Mashiro
3e3866c1b9
[Feature] Add optimizer wrapper ( #265 )
...
* Support multiple optimizers
* minor refinement
* improve unit tests
* minor fix
* Update unit tests for resuming or saving ckpt for multiple optimizers
* refine docstring
* refine docstring
* fix typo
* update docstring
* refactor the logic to build multiple optimizers
* resolve comments
* ParamSchedulers spports multiple optimizers
* add optimizer_wrapper
* fix comment and docstirng
* fix unit test
* add unit test
* refine docstring
* RuntimeInfoHook supports printing multi learning rates
* resolve comments
* add optimizer_wrapper
* fix mypy
* fix lint
* fix OptimizerWrapperDict docstring and add unit test
* rename OptimizerWrapper to OptimWrapper, OptimWrapperDict inherit OptimWrapper, and fix as comment
* Fix AmpOptimizerWrapper
* rename build_optmizer_wrapper to build_optim_wrapper
* refine optimizer wrapper
* fix AmpOptimWrapper.step, docstring
* resolve confict
* rename DefaultOptimConstructor
* fix as comment
* rename clig grad auguments
* refactor optim_wrapper config
* fix docstring of DefaultOptimWrapperConstructor
fix docstring of DefaultOptimWrapperConstructor
* add get_lr method to OptimWrapper and OptimWrapperDict
* skip some amp unit test
* fix unit test
* fix get_lr, get_momentum docstring
* refactor get_lr, get_momentum, fix as comment
* fix error message
Co-authored-by: zhouzaida <zhouzaida@163.com>
2022-06-01 18:04:38 +08:00
Zaida Zhou
f1da9a1d7f
[Feature] Support multiple optimizers ( #235 )
...
* Support multiple optimizers
* minor refinement
* improve unit tests
* minor fix
* Update unit tests for resuming or saving ckpt for multiple optimizers
* refine docstring
* refine docstring
* fix typo
* update docstring
* refactor the logic to build multiple optimizers
* resolve comments
* ParamSchedulers spports multiple optimizers
* refine docstring
* RuntimeInfoHook supports printing multi learning rates
* resolve comments
* fix typo
2022-05-31 16:54:39 +08:00
Jiazhen Wang
f2190de787
[Enhance] Improve Exception in call_hook ( #247 )
...
* improve exception in call_hook
* refine unit test
* add test_call_hook
* refine
* update docstring and ut
2022-05-31 11:34:30 +08:00
jbwang1997
38b22d9e68
[Enhance] Enhance error report when a module has been registered in registery. ( #264 )
...
* Update
* Add unittest
2022-05-31 11:31:04 +08:00
RangiLyu
172b9ded4a
[Fix] Fix ema state dict swapping in EMAHook and torch1.5 ut. ( #266 )
...
* [Fix] Fix ema state dict swapping in EMAHook.
* fix pt1.5 ut
* add more comments
2022-05-30 16:51:06 +08:00
Jingwei Zhang
40daf46a45
Support validation only after some epoch/iteration in ValLoop ( #257 )
...
* add the epoch/iter that begins validating
* fix lint
* add property and fix unit test
* minor changes
* fix typos and add unit test
* add unit test about begin
* fix docstring
2022-05-27 15:10:12 +08:00
RangiLyu
4705e1fe3d
[Enhance] Add RuntimeInfoHook to update runtime information. ( #254 )
...
* [Enhance] Add RuntimeInfoHook to update runtime information.
* move lr to runtime info
* docstring
* resolve comments
* update ut and doc
2022-05-26 14:35:37 +08:00
Jiazhen Wang
4cbbbc0c31
[Enhance] Refine sync random seed ( #256 )
...
* refine sync random seed
* cancel seed param in batch-sampler
2022-05-25 19:18:03 +08:00
Haian Huang(深度眸)
c197bdf359
[Feature] Profiling tools ( #241 )
...
* Add profiling tools
* fix docstr
* fix docstr
* update
* fix bug
* update
* update
* fix error
* fix mypy
* uodate
* merge main
* fix UT
2022-05-25 10:55:07 +08:00
Haian Huang(深度眸)
8d3bd4dfef
Move get_max_cuda_memory and set_multi_processing to public function ( #250 )
...
* move get_max_cuda_memory and set_multi_processing to a public function
* fix lint
* fix lint
* fix lint
* delete _set_multi_processing
* fix error
* rename
2022-05-24 19:36:55 +08:00
Jiazhen Wang
a976257ca9
[Enhance] Support Custom LogProcessor ( #251 )
...
* support custom log processor
* supplementary docs
* format code
2022-05-24 17:17:35 +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
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
liukuikun
689837d2b8
[Enhancement] add pixel data and label data ( #224 )
2022-05-13 18:23:25 +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
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
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
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
Mashiro
db2b45b7ac
[Fix] Fix the probable failure of the basedataset unit test ( #210 )
2022-04-27 19:48:28 +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
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
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
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
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
Mashiro
45567b1d1c
automaticaly update iter and epoch in message_hub ( #168 )
...
* automatic update iter and epoch in message_hub
* add docstring
* Update comment and docstring
* Fix as comment
* Fix docstring and comment
* refine comments
2022-04-21 11:45:03 +08:00
liukuikun
5f8f36e6a5
refactor visualization ( #147 )
...
* [WIP] add inline
* refactor vis module
* [Refactor] according review
* [Fix] fix comment
* fix some error
* Get sub visualizer be Visualizer.get_instance
* fix conflict
* fix lint
* fix unit test
* fix mypy
* fix comment
* fix lint
* update docstr
* update
* update instancedata
* remove replace __mro__ with issubclass
Co-authored-by: PJLAB\huanghaian <1286304229@qq.com>
Co-authored-by: HAOCHENYE <21724054@zju.edu.cn>
2022-04-15 15:56:06 +08:00
Mashiro
605e78be82
Haochenye/fix logging ( #167 )
...
* remove LoggerHook master_only
* remogve \t in log string
* fix lint
* Fix lint
2022-04-12 21:50:30 +08:00
RangiLyu
6e4bcc997d
[Fix] Fix resume from checkpoint. ( #174 )
2022-04-12 21:49:31 +08:00
RangiLyu
3d830a28b6
[Fix]: Fix is_model_wrapper and add DistSamplerSeedHook to default hooks. ( #172 )
...
* [Fix]: Fix model_wrapper and add DistSamplerSeedHook as default hook.
* add comments
2022-04-08 22:18:23 +08:00
ZwwWayne
93d22757cf
Merge branch 'main' into adapt
2022-04-08 16:02:05 +08:00
Zaida Zhou
50650e0b7a
[Enhancement] Refactor the unit tests of dist module with MultiProcessTestCase ( #138 )
...
* [Enhancement] Provide MultiProcessTestCase to test distributed related modules
* remove debugging info
* add timeout property
* [Enhancement] Refactor the unit tests of dist module with MultiProcessTestCase
* minor refinement
* minor fix
2022-04-08 15:58:03 +08:00
RangiLyu
59cc08e3ac
[Refactor] Refactor data_batch type and remove cur_dataloader in runner. ( #171 )
...
* [Refactor] Refactor data_batch type.
* fix sampler
* [Refactor] Remove cur_dataloader in runner.
* fix set_epoch
2022-04-08 15:57:10 +08:00
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
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
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
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
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
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
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
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
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
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
liukuikun
3adf4ea6b8
[Fix] data element ( #95 )
2022-03-06 22:06:12 +08:00
Mashiro
2d782b4998
[Feature] add logging UT and impl ( #43 )
...
* first commit
* update logging
* update MessageHub unit test and LogBuffer unitest
* update logging docs
* update logging impl and test
* update test logging
* update test
* update logging test and impl
* Fix logging test
* Update log_buffer.py
* rename statistics argumentes
* fix as comment
* Fix as comment
* Fix as comment
* Fix as comment
* Fix meta class
* Fix as comment
* Fix as comment
* Fix as comment
* Fix name declare
* Fix as comment
* Fix as comment
* Fix as comment
* Fix docstring
* Fix as comment
* Fix as comment
2022-03-06 17:09:12 +08:00
Zaida Zhou
c6a8d72c5e
[Feature] Add distributed module ( #59 )
...
* [Feature] Add distributed module
* fix IS_DIST error
* all_reduce_dict does operations in-place
* support 'mean' operation
* provide local group process
* add tmpdir argument for collect_results
* add unit tests
* refactor unit tests
* simplify steps to create multiple processes
* minor fix
* describe the different of *gather* in mmengine and pytorch
* minor fix
* add unit tests for nccl
* test nccl backend in multiple gpu
* add get_default_group function to handle different torch versions
* minor fix
* [Feature] Add distributed module
* fix IS_DIST error
* all_reduce_dict does operations in-place
* support 'mean' operation
* provide local group process
* add tmpdir argument for collect_results
* add unit tests
* refactor unit tests
* simplify steps to create multiple processes
* minor fix
* describe the different of *gather* in mmengine and pytorch
* minor fix
* add unit tests for nccl
* test nccl backend in multiple gpu
* add get_default_group function to handle different torch versions
* minor fix
* minor fix
* handle torch1.5
* handle torch1.5
* minor fix
* fix typo
* refactor unit tests
* nccl does not support gather and gather_object
* fix gather
* fix collect_results_cpu
* fix collect_results and refactor unit tests
* fix collect_results unit tests
* handle torch.cat in torch1.5
* refine docstring
* refine docstring
* fix comments
* fix comments
2022-03-05 22:03:32 +08:00
liukuikun
11b38b12d6
[Fix] fix random may generate same value ( #85 )
2022-03-05 15:02:54 +08:00
RangiLyu
64b1d183b9
Add runner unit tests. ( #68 )
...
* add runner unit tests
* update
* update
* add test custom loop and hook
* add test model wrapper
* add test setup env
* fix typo
* fix launcher
* fix typo
* test default scope
* add logger test
* fix dataloader
* add test loop
* resolve comments
* resolve comments
2022-03-03 19:44:36 +08:00
Yifei Yang
149248ce52
[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
Mashiro
12b916cf6f
[Feature] add base global access ( #72 )
...
* add impl
* add test
* Fix as comment
* Fix as comment
* Fix as comment
* Fix as comment
2022-03-02 23:38:04 +08:00
Yuan Liu
cf239a2b17
[Feature]: Add checkpoint hook ( #66 )
...
* [Feature]: Add checkpoint hook
* [Fix]: Fix lint
* [Fix]: Delete redundant optional and give an example to our_dir
* [Feature]: Add test the last_ckpt in UT
* [Fix]: Fix docstring problem
* [Fix]: Add patch to UT
* [Feature]: Add Test case for by epoch
2022-03-02 22:01:58 +08:00
Yifei Yang
2448380339
use unittest mock ( #71 )
2022-03-02 21:53:40 +08:00
Yifei Yang
94ab45d07e
[Feature] Add empty cache hook ( #58 )
...
* [Feature]: Add Part3 of Hooks
* [Feature]: Add Hook
* [Fix]: Add docstring and type hint for base hook
* [Fix]: Add test case to not the last iter, inner_iter, epoch
* [Fix]: Add missing type hint
* [Feature]: Add Args and Returns in docstring
* [Fix]: Add missing colon
* [Fix]: Add optional to docstring
* [Fix]: Fix docstring problem
* [Fix]: Fix lint
* fix lint
* update typing and docs
* fix lint
* Update mmengine/hooks/empty_cache_hook.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/hooks/empty_cache_hook.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/hooks/empty_cache_hook.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update tests/test_hook/test_empty_cache_hook.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* fix lint
* fix comments
* remove test condition
Co-authored-by: seuyou <3463423099@qq.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-03-02 14:04:41 +08:00
Yuan Liu
63a3af4f8c
[Feature]: Add optimizer hook ( #70 )
...
* [Feature]: Add optimizer hook
* [Fix]: Update docstring
* [Fix]: Add call with in UT
2022-03-01 17:42:15 +08:00
Yuan Liu
ab31e1936e
[Feature]: Add param scheduler hook ( #63 )
...
* [Feature]: Add param scheduler hook
* [Fix]: update docstring and add assert_call to UT
2022-03-01 15:49:44 +08:00
Yuan Liu
2d3e91248c
[Feature]: Add sampler seed hook ( #64 )
...
* [Feature]: Add sampler seed hook
* [Fix]: Add call with to UT
2022-03-01 15:38:01 +08:00
Yifei Yang
1244e486ae
[Feature] Add Iter Timer Hook ( #48 )
...
* [Feature]: Add Part3 of Hooks
* [Feature]: Add Hook
* add iter timer hook
* update test
* [Fix]: Add docstring and type hint for base hook
* fix mypy
* improve doc coverage and merge main
Co-authored-by: seuyou <3463423099@qq.com>
2022-03-01 12:02:34 +08:00
Yining Li
42448425b3
[Feature] Add evaluator unittest ( #46 )
...
* add evaluator unittest
* update composed evaluator cfg
* add building function
* resolve comments
* resolve comments
* resolve comments
* fix evaluator doc
2022-03-01 12:00:19 +08:00
RangiLyu
c2c5664fad
Fix pt1.5 unit tests. ( #65 )
...
* Fix pt1.5 unit tests.
* move to mmengine.testing
2022-03-01 11:28:21 +08:00
Haian Huang(深度眸)
5170676a2f
fix mmdp unittest ( #60 )
2022-02-27 20:34:52 +08:00
Yuan Liu
bc759e5550
[Feature]: Add base Hook ( #47 )
...
* [Feature]: Add Part3 of Hooks
* [Feature]: Add Hook
* [Fix]: Add docstring and type hint for base hook
* [Fix]: Add test case to not the last iter, inner_iter, epoch
* [Fix]: Add missing type hint
* [Feature]: Add Args and Returns in docstring
* [Fix]: Add missing colon
* [Fix]: Add optional to docstring
* [Fix]: Fix docstring problem
* [Fix]:typo
* [Fix]: Fix lint
Co-authored-by: Your <you@example.com>
2022-02-26 14:51:09 +08:00
Haian Huang(深度眸)
492b2f2fa8
[Feature] Add MMDataParallel and MMDistributedDataParallel ( #44 )
...
* add mmddp
* update
* update code
* update unittest
* fix comment
2022-02-26 10:21:20 +08:00
Zaida Zhou
1e79b97444
Mock unimplemented modules and fix unit tests ( #54 )
...
* Mock unimplemented modules and fix unit tests
* add a comment
2022-02-25 15:24:27 +08:00
liukuikun
9437ebea67
[Feat]: Add abstract data structure ( #29 )
...
* [WIP] abstract-data-structure
* update docs
* update
* update BaseDataSample
* fix comment and coverage 100%
* update and add _set_field
* update
* split into base_data_element and base_data_sample
* update
* update
* update
* fix typo
2022-02-22 21:45:32 +08:00
Mashiro
ada6660c65
[Feature] add base dataset ( #32 )
...
* basedataset first commit
* add base dataset
* add dataset
* add basedataset
* Fix test dataset
* Fix mypy and test
* Fix mypy and test
* remove unused code
* Update mmengine/dataset/base_dataset.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/dataset/base_dataset.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* add more corner cases in unittest
* fix lint
* Fix as comment
* Fix lint
* update unitest
* Type hint Dick to dict
* rename max_refetch
* Fix as comment
* Fix typo
* Fix as comment
* BaseDataset is no more an abstrac Class, change UT and docs
* Fix as comment
* Fix as comment and refactor type error
* Add comment for full init
* Fix as comment and modify dataset_wrapper
* Fix as comment and modify dataset_wrapper
* Fix as comment
* Fix as comment
* Fix as comment
* Fix as comment
* Fix as comment
* Fix as comment
* Fix as comment
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Tao Gong <gongtao950513@gmail.com>
2022-02-22 14:01:06 +08:00
Haian Huang(深度眸)
adb2aee8c2
[Unittest] Add visualizer unittest ( #27 )
...
* add visualizer unittest
* update
* fix comment
* fix commit
* fix comment
* fix comment
2022-02-21 20:55:11 +08:00
Ma Zerun
f0451a38f0
[Feature] Add data sampler ( #30 )
...
* Add DefaultSampler and InfiniteSampler
* Add unit test
* Add samplers to API reference
* Update docstring
* Improve according to comments
* Rename `num_replicas` to `world_size`
* Update docstring.
* Update mmengine/data/sampler.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/data/sampler.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Fix typo in unit test
Co-authored-by: Wenwei Zhang <40779233+ZwwWayne@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-02-21 13:08:55 +08:00
RangiLyu
7353778b7c
[Feature]: Add optimzier and constructor. ( #25 )
...
* [Feature]: Add optimzier and constructor.
* refactor unit tests
* add optimizer doc
* add parrots wrapper
* add parrots wrapper
* solve comments
* resolve comments
2022-02-19 14:09:37 +08:00
Mashiro
b8e7c8ee8f
Fix test_auto_argparse when pytest has multiple arguments ( #34 )
2022-02-19 12:22:15 +08:00
Yifei Yang
6bd813c8ba
[Feature] Add Config ( #24 )
...
* add config test
* Fix typo
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update tests/config/test_config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Reconstruct config test
* Fix import logic and error test
* Fix path error
* Restructuring Config
* simplify test logic
simplify test logic
* add config
* [Feature] Add Config
* fix lint
* remove test_config
* cancel change to pre-commit yaml
* solve conflict
* fix comments
* merge main
* fix lint
* update
* remove some magic docs
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* add deprecation test
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmengine/config/config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* update
* fix mypy
* fix lint
* fix super
* improve ut coverage
* add test dump
Co-authored-by: HAOCHENYE <21724054@zju.edu.cn>
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-02-17 22:33:21 +08:00
Mashiro
8751231103
add config test ( #10 )
...
* add config test
* Fix typo
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update tests/config/test_config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Reconstruct config test
* Fix import logic and error test
* Fix path error
* Restructuring Config
* simplify test logic
simplify test logic
* rename test_config file
* add test complex dump and pretty text
* adjust test sequence according to comment
adjust test sequence according to comment
* add comment and test for simple.config.py
* add config test data
* add init
* remove __pycache__
* fix as comment
* add syntax test case
* remove tmp path and modify comment
* add test for setattr
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-02-17 17:46:06 +08:00
RangiLyu
7905f039b6
[Feature]: Add parameter schedulers. ( #22 )
...
* [Feature]: Add parameter schedulers.
* update
* update
* update
* update
* add docstring to lr and momentum
* resolve comments
2022-02-16 23:43:59 +08:00
Wenwei Zhang
41e1191cbc
add unit tests of data abstract interface ( #21 )
...
* add unit tests of data abstract interface
* update
* update
* update docs of data element
* a draft of UT of datasample, to be finished
* update datasample test
* updata
* update
* fix comments
* fix comments
* fix comments
Co-authored-by: liukuikun <liukuikun@sensetime.com>
2022-02-16 23:19:18 +08:00
RangiLyu
bbb7d625e6
add scheduler unit test ( #13 )
...
* tmp
* add scheduler unit test
* disable yapf
* add more test
* add more test
* not use torch test case
* solve comments
* update file
* add more unit tests
* resolve comments
* update cosine ut
* fix typo
* solve comments
* solve comments
* resolve comments
2022-02-16 22:33:46 +08:00
Zaida Zhou
cccd20a636
[Feature] Add Registry ( #11 )
2022-02-16 21:45:39 +08:00
Zaida Zhou
166ca02363
[Refactor] Move fileio directory from utils ( #23 )
...
* move fileio directory from utils
* remove CephBackend from fileio and clear some deprecated docstring
* fix format
* fix a spellling error
2022-02-15 23:43:20 +08:00
Tao Gong
100ede73e6
Add unittest for BaseDataset ( #15 )
...
* tmp commit
* add unittest for basedataset
* fix lint
* resolve all comments
* update
* update
* update
* update
* update
* update
* update
* resolve comments
* resolve comments
* update
* resolve comments
* resolve comments
2022-02-15 20:17:47 +08:00
Zaida Zhou
6ba7ac3a8e
Add the unittest of registry ( #5 )
...
* Add the unittest of registry
* improve the format
* fix the test_repr
* refactor the test_init
* add the copyright for tests directory
* add more unit tests
* fix error
* add unit tests for _search_child and _get_root_registry
* build_from_cfg supports dict, ConfictDict and Config
* improve docstring
2022-02-15 15:37:53 +08:00