Commit Graph

293 Commits (08602a238508b70fe42e2018ecad42d24f18f938)
 

Author SHA1 Message Date
LeoXing1996 08602a2385
[Enhancement] Support save best based on multi metrics (#349)
* support save best based on multi metrics

* add unit test

* resolve bugs after rebasing

* revise docstring

* revise docstring

* fix as comment

* revise as comment
2022-08-08 20:17:17 +08:00
Mashiro 6ebb7ed481
[Fix] Fix config cannot change(assign) the value of the dict in config(without base config) (#378)
* Support changing value of dict in config(without base config)

* minor refine
2022-08-08 17:07:47 +08:00
Mashiro 5580542666
[Fix] Fix build multiple list of scheduler for multiple optimizers (#383)
* fix build multiple scheduler

* add new unit test

* fix comment and error message

* fix comment and error message

* extract _parse_scheduler_cfg

* always call build_param_scheduler during train and resume. If there is only one optimizer, the defaut value for sheduler will be a list, otherwise there is multiple optimizer, the default value of sheduler will be a dict

* minor refine

* rename runner test exp name

* fix as comment

* minor refine

* fix ut

* only check parameter scheduler

* minor refine
2022-08-08 17:05:27 +08:00
Mashiro 1a8f013937
[Refine] Make scheduler default to None (#396)
* make scheduler default to None

* fix bc breaking

* refine warning message

* fix as comment

* fix as comment

* fix lint
2022-08-04 20:13:13 +08:00
Mashiro df4e6e3294
[Fix] Fix resume `message_hub` and save `metainfo` in message_hub. (#394)
* Fix resume message hub and save metainfo in messagehub

* fix as comment
2022-08-02 19:06:35 +08:00
Mashiro eb25129935
[Feature]: add epoch log scalar (#391) 2022-08-02 19:01:06 +08:00
Mashiro f850de71c3
[Fix] Support use 'global variable' in config function (#390)
* Support use 'global var' in config function

* upload test file
2022-08-01 20:10:10 +08:00
Yuan Liu 81c3de54b9
[Fix]: Fix resume bug (#389)
* [Fix]: Fix resume bug

* [Fix]: Change last_checkpoint check logic

* [Fix]: Fix lint

* [Fix]: Change warning to print_log
2022-08-01 13:20:08 +08:00
RangiLyu 84cd19aaa2
[Enhance] Support convert float begin&end in ParamScheduler. (#393) 2022-08-01 10:26:58 +08:00
RangiLyu 4432e54c97
[Fix] Fix gpu tensors in results list are not on the same device. (#385)
* [Fix] Fix gpu tensors in results list are not on the same device.

* cast all tensor to cpu
2022-08-01 10:20:57 +08:00
RangiLyu cfee85ff16
[Enhance] Return loop results. (#392) 2022-07-30 20:22:52 +08:00
Miao Zheng 39e7efb04d
[Fix] Revise UT of OneCycle schedulor (#388) 2022-07-27 16:22:00 +08:00
Mashiro ec72f59bf3
[Enhance] Remove blink info and debug level message (#371)
* remove blink info debug msg

* minor refine

* minor refine
2022-07-22 14:41:51 +08:00
RangiLyu f3189918e5
[Fix] Fix logged and current weight not on the same device. (#382) 2022-07-22 14:41:11 +08:00
RangiLyu 16ef54c45d
[Fix] Fix compatibility of persistent_workers. (#379) 2022-07-21 16:02:51 +08:00
Mashiro 6bd548d8bb
[FIx] Logging time in LoggerHook.after_val_epoch has no effect (#376) 2022-07-20 16:51:11 +08:00
Mashiro 6b47035fdf
[Fix] Fix save scheduler state dict with optim wrapper (#375)
* fix save scheduler state dict with optim wrapper

* remove for loop and inherit TestParameterScheduler

* remove for loop and inherit TestParameterScheduler

* minor refine
2022-07-20 16:32:48 +08:00
Tong Gao 5b065b10fd
[Enhance] Support Compose(None) (#373)
* [Enhance] Allow Compose(None)

* add typehint

* fix
2022-07-20 16:04:24 +08:00
Mashiro ea61bf6bb7
Fix: avoid modification of scalar_dict in LocalVisBackend (#377) 2022-07-20 16:03:01 +08:00
Mashiro 5b648c119f
[Fix] Fix LogProcessor._get_iter (#370) 2022-07-19 18:30:59 +08:00
RangiLyu 1241c21296
[Fix] Fix weight initializing in test and refine registry logging. (#367)
* [Fix] Fix weight initializing and registry logging.

* sync params

* resolve comments
2022-07-19 18:28:57 +08:00
Ma Zerun 3da66d1f87
[Enhance] Auto set the `end` of param schedulers. (#361)
* [Enhance] Auto set the `end` of param schedulers.

* Add log output and unit test

* Update docstring

* Update unit tests of `CosineAnnealingParamScheduler`.
2022-07-15 19:53:28 +08:00
Mashiro 78fad67d0d
[Fix] fix resume message_hub (#353)
* fix resume message_hub

* add unit test

* support resume from messagehub

* minor refine

* add comment

* fix typo

* update docstring
2022-07-14 20:13:22 +08:00
Mashiro c9c6d454f1
init OptimWrapper after resume (#362) 2022-07-14 20:10:48 +08:00
Mashiro 45001a1f6f
[Enhance] Support using variables in base config directly as normal variables. (#329)
* first commit

* Support modify base config and add unit test

* remove import mmengine in config

* add unit test

* fix lint

* add unit test

* move RemoveAssignFromAST to config utils

* git add utils

* fix format issue in test file

* refine unit test

* refine unit test
2022-07-14 13:05:55 +08:00
Mashiro 6b608b4ef1
[Enhance] Add `build_model_from_cfg` (#328)
* clean code

* fix as comment

* fix as comment

* add get_registry_by_scope method

* add unit test and docstring example

* rename get_registry_by_scope to switch_scope_and_registry

* move build function to registry/builder

* fix docstring

* rename builder->registry_builder, move build_from_cfg to registry_builder

rename builder->registry_builder, move build_from_cfg to registry_builder

* rename registry_builder to build_function

rename registry_builder to build_function

* fix docstring and type hint

* rename build_function to build_functions
2022-07-13 19:01:59 +08:00
ChaimZhu acd9cab25a
[Fix] fix `is_abs` criterion error (#358)
* fix abs criterion error

* update
2022-07-12 11:16:08 +08:00
Mashiro 936c4ebc58
[Fix] Fix missing device ids in wrap_model (#351)
* fix missing device ids in wrap_model

* clean the code

* use default broadcast_buffers

* refine MMSeparateDistributedDataParallel

* rename tmp variable

* refine docstring

* add type hints

* refactor docstring of ddp model

* add  arg in docstring

* minor refine

* better ddp link
2022-07-08 15:01:47 +08:00
VVsssssk 792f481efe
[Fix]fix ClassBalancedDataset (#354)
* fix cbds

* fix
2022-07-08 14:51:51 +08:00
Mashiro b2ee9f8b11
[Fix] Fix loss could be nan in optimizer wrapper (#345)
* fix optimizer wrapper counts

* fix ut
2022-07-06 16:42:49 +08:00
Mashiro 96378fa748
[Fix] make `autocast` compatible with GTX1660 and make it more robust. (#344)
* fix amp

* fix amp

* make logic consistent with torch.autocast

* support multiple device

* fix as comment

* fix as comment

* avoid circle import
2022-07-05 20:37:56 +08:00
RangiLyu a3d2916790
[Enhance] Support scheduling betas with MomentumScheduler. (#346)
* [Enhance] Support scheduling betas with MomentumScheduler.

* enhance ut

* test adam betas

* enhance ut

* enhance ut
2022-07-05 20:37:23 +08:00
Mashiro 2853045e96
[Fix] Fix build multiple runners error (#348)
* fix build multiple runner error

* fix comments

* fix cpu ci
2022-07-05 20:35:06 +08:00
Mashiro 38e78d5549
[Fix] Fix ema hook and add unit test (#327)
* Fix ema hook and add unit test

* save state_dict of ema.module

save state_dict of ema.module

* replace warning.warn with MMLogger.warn

* fix as comment

* fix bug

* fix bug
2022-07-04 14:23:23 +08:00
Cedric Luo 9c55b4300c
[Enhance] Support dynamic interval (#342)
* support dynamic interval in iterbasedtrainloop

* update typehint

* update typehint

* add dynamic interval in epochbasedtrainloop

* update

* fix

Co-authored-by: luochunhua.vendor <luochunhua@pjlab.org.cn>
2022-06-30 15:08:56 +08:00
LeoXing1996 d65350a9da
[Fix] Fix bug of not save-best in iteration-based training (#341)
* fix bug of not save-best in iteration-based training

* revise the unit test
2022-06-30 14:51:31 +08:00
Mashiro 59b0ccfe6f
[Fix] Fix pytorch version compatibility of autocast (#339)
* fix unit test of autocast

* fix compatiblity of unit test of optimizerwrapper

* clean code

* fix as comment

* fix docstring
2022-06-29 20:30:53 +08:00
Mashiro 5ac3c23338
[Fix]: fix MMSeparateDistributedDataParallel (#338) 2022-06-28 22:20:20 +08:00
Mashiro d624fa9191
[Enhance] assert image shape before forward (#300)
* assert image shape before forward

* add unit test

* enhance error message

* allow gray image input

* fix as comment

* fix unit test

* fix unit test
2022-06-28 11:46:12 +08:00
Zaida Zhou 6015fd35e5
Fix docstring format (#337) 2022-06-28 11:04:55 +08:00
Mashiro 2fd6beb972
[Fix] Fix UT of optimizer wrapper failed in pytorch1.6 (#340) 2022-06-28 10:31:14 +08:00
Jiazhen Wang bbe00274c8
[Enhance] LR and Momentum Visualizer (#267)
* impl lr and momentum visualizer

* provide fakerun
2022-06-27 15:00:11 +08:00
Jiazhen Wang 3af3d40541
[Enhance] Refine BaseDataset (#303)
* refine data_root and data_prefix params

* modify unittest
2022-06-27 14:59:56 +08:00
Yuan Liu 03d5c17ba6
[Feature]: Set different seed to different rank (#298)
* [Feature]: Set different seed for diff rank

* [Feature]: Add log

* [Fix]: Fix lint

* [Fix]: Fix docstring

* [Fix]: Fix sampler seed

* [Fix]: Fix log bug

* [Fix]: Change diff_seed to diff_rank_seed

* [Fix]: Fix lint
2022-06-24 14:28:16 +08:00
Jiazhen Wang 12f7d3a0d3
[Fix]: fix load_checkpoint (#332) 2022-06-23 16:53:53 +08:00
Alex Yang 2994195be2
[Feat] Support training on MPS (#331)
* [Feat] Support mps

* fix docstring
2022-06-23 16:53:19 +08:00
Zaida Zhou e877862d5b
[Docs] Improve docstring (#324)
* Fix docstring format of BaseDataElement

* fix docstring
2022-06-23 16:08:56 +08:00
Mashiro a4f5533db6
fix torch 1.10 amp error (#330) 2022-06-22 23:12:20 +08:00
Haian Huang(深度眸) 2b8a32eca0
[Fix]: fix RuntimeError of SyncBuffersHook (#309)
* fix RuntimeError of SyncBuffersHook

* add UT
2022-06-22 20:00:46 +08:00
Alex Yang e18832f046
[Feat] Support revert syncbn (#326)
* [Feat] Support revert syncbn

* use logger.info but not warning

* fix info string
2022-06-22 19:50:54 +08:00