Commit Graph

487 Commits (17624d250e30b6159e2a699ee3b4ad7943627fc1)
 

Author SHA1 Message Date
Mashiro 17624d250e
Bump version to v0.3.2 (#763)
* Bump version to v0.3.2

* minor refine

* Apply suggestions from code review

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* remove highlights

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-11-24 23:38:26 +08:00
liukuikun 5f58517069
[Enchance] remove redundant attributes in BaseDataElement (#690)
* remove redundant attribute in dump or print

* optimize efficiency

Co-authored-by: HAOCHENYE <21724054@zju.edu.cn>
2022-11-24 21:36:19 +08:00
Mashiro ded73f3a56
[Enhance] Enhance compatibility of `revert_sync_batchnorm` (#695)
* [Enhance] Enhance revert_sync_batchnorm and convert_sync_batchnorm

* [Enhance] Enhance revert_sync_batchnorm and convert_sync_batchnorm

* Fix unit test

* Add coments

* Refine comments

* clean the code

* revert convert_sync_batchnorm

* revert convert_sync_batchnorm

* refine comment

* fix CI

* fix CI
2022-11-24 16:41:54 +08:00
BayMax_BHL 9b4dbb3131
Update the repo url of pyupgrade pre-commit hook (#756) 2022-11-23 20:11:53 +08:00
cir7 0e6bb48b12
[Enhance] Support eta_min_ratio in CosineAnnealingParamScheduler (#725)
* [Enhance] support eta_min_ratio in CosineAnnealingParamScheduler

* [doc] fix docstring

* [Enhance] add ut for eta_min_ratio

* [doc] update docstring

* avoid bc-breaking of eta_min

* [doc] add docstring in CosineAnnealingParamScheduler and CosineAnnealingMomentum

* Apply suggestions from code review

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-11-22 20:19:16 +08:00
songyuc 6636f07cfe
[Feature] Add get_hooks_info() to print hooks messages (#672)
* Add test of get_hooks_info()

* Change to use original Runner for get_hook_info() test

* Change to test after_train_iter hooks for get_hook_info()

* Complement the stages list

* Add logging hooks information in Runner.__init__()

* Rearrange the stages list

* Restore the stages to tuple type

* Clean the unnecessary changes

* Replace  statement with TestCase's methods

* add test stages in method_stages_map

* change the hooks info into a f-string

* return list(trigger_stages) directly

* change keys of method_stages_map

* Fix previous changes to method_stages_map.keys
2022-11-22 20:02:29 +08:00
Mashiro b06234cfcd
[Enhance] Right align the log (#436)
* right allign the log

* fix as comment

* Add comments for magic number 3

* remove max_len_str

* Update mmengine/runner/log_processor.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-11-21 11:55:18 +08:00
Mashiro c478bdca27
[Enhance] enhance runner test case (#631)
* Add runner test cast

* Fix unit test

* fix unit test

* pop None if key does not exist

* Fix is_model_wrapper and force register class in test_runner

* [Fix] Fix is_model_wrapper

* destroy group after ut

* register module in testcase

* fix as comment

* minor refine

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* fix lint

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-11-21 11:54:05 +08:00
shenmishajing b7aa4dd885
[Fix]: fix add graph function is not called bug in visualization hooks (#632)
* fix add graph func is not called bug

* move add graph call to NaiveVisualizationHook.before_train

* Update mmengine/hooks/naive_visualization_hook.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* adjust param sequence and add docstring

* minor refine

* Update mmengine/visualization/vis_backend.py

* update version info

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: HAOCHENYE <21724054@zju.edu.cn>
2022-11-21 11:52:48 +08:00
Yixiao Fang 9d5b417f07
[Fix] Fix T_max may be None in CosineAnnealingParamScheduler (#735) 2022-11-19 10:39:19 +08:00
Austin Welch d6f41bcf74
[Fix] Send stderr to subprocess.PIPE (#740) 2022-11-18 14:54:53 +08:00
Xin Li d837fc1ca7
[Docs] Visualization docs translate (#692) 2022-11-18 10:45:15 +08:00
RangiLyu a9a575866f [Fix] Fix offline_evaluate index error (#630)
* [Fix] Fix offline eval dataset index error.

* update

* update
2022-11-18 01:17:12 +08:00
RangiLyu f2b0540f58 [Enhance] Raise warning for abnormal momentum (#655) 2022-11-18 01:17:12 +08:00
Zaida Zhou 4a9df3bd3b
fix typo (#734) 2022-11-17 22:23:50 +08:00
MengzhangLI e98d262415
[Fix] Fix basedataset typo about lazy initialization (#733) 2022-11-17 14:43:46 +08:00
Tao Gong f9158e233e
[Docs] Add English docs of BaseDataset (#713)
* add chinese docs of BaseDataset

* fix typo

* fix lint

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Update docs/en/advanced_tutorials/basedataset.md

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Update basedataset.md

* Update basedataset.md

* Update basedataset.md

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-11-15 20:20:46 +08:00
Mashiro 6eced86f6b
[Enhancement] Format the log of `CheckpointLoader.load_checkpoint` (#685)
* Format log of

* Fix as comment

* Update mmengine/runner/checkpoint.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-11-15 20:18:33 +08:00
Mashiro 48650f3bac
Update issue template (#707)
* Update issue template

* Update issue template

* Update issue template

* Update issue template

* Fix as comment

* Apply suggestions from code review

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-11-09 22:09:37 +08:00
GPH 46209b8cbf
[Fix] Fix examples/distributed_training.py does not work in DDP (#700)
* Update distributed_training.py

Better example for DDP training

* Update distributed_training.py

* Update distributed_training.py

update according to reviwer's suggesstions.

* Update distributed_training.py

* Update distributed_training.py

The previous update copy data from main branch, its a mistake.
This update fix this mistake and the code is tested.
2022-11-09 22:04:08 +08:00
Mashiro b35196acd6
Bump version to v0.3.1 (#706)
* Bump version to v0.3.1

* Bump version to v0.3.1

* Apply suggestions from code review

Fix as comment

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* update pr

* update pr

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-11-09 17:09:51 +08:00
Xiangxu-0103 a530c0d671
[Docs] Refine docs/zh_cn/tutorials (#694) 2022-11-09 14:27:45 +08:00
Mashiro 0f62a6c091
[Fix] Remove besk ckpt only in master rank (#682) 2022-11-08 19:13:35 +08:00
Sanbu 103ad60773
[Docs] Fix typo in docs (#702) 2022-11-08 19:09:03 +08:00
Mashiro 5e60402dca
[Enhance] Replace `print` with `print_log` for those functions called by runner (#686)
* Replace print with print_log for those function called by runner

* minor refine

* Fix as comment
2022-11-08 16:35:36 +08:00
Sanbu ed20a9cba5
[Docs] Fix metric typo (#675) 2022-11-06 21:58:47 +08:00
Mashiro 41c0425d6d
Add mmyolo mapping in PKG2PROJECT (#684)
* Add mmyolo to PKG2PROJECT

* Minor refine

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-11-06 21:52:54 +08:00
Mashiro ce7d742407
Fix documentation reference in runner docstring (#668)
* [Fix]Fix error URL in runner docstring

* [Fix]Fix error URL in runner docstring

* clean the code
2022-11-03 15:36:50 +08:00
Sanbu c41f193b4c
[Docs] Add mmeval link in README (#669) 2022-11-03 15:35:36 +08:00
Mashiro 4e685931d0
Bump version to v0.3.0 (#661)
* Bump version to v0.3.0

* minor refine

* Fix as comment

* Fix as comment

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-11-02 19:34:03 +08:00
Mashiro e1c7674b5b
[Fix] Fix potential OOM error when loading checkpoint with `map_location="cuda:0"` (#665)
* [Fix] Change the default value of map_location in PretrainedInit to cpu

* Fix as comment
2022-11-02 19:33:33 +08:00
Yanhong Zeng 618a063ddc
[Docs] Fix docstring and documentation used for hub.get_model (#659)
* fix docstring and documentation used for hub.get_model

* fix config name in test_hub

* fix docstring mentioned faster-rcnn in utils
2022-11-02 10:16:56 +08:00
Mashiro 3aba989fbc
[Docs] Fix docstring of BaseDataset (#656)
* [Fix] Fix docstring of BaseDataset

* minor refine
2022-11-01 17:31:09 +08:00
Sanbu 5b0d4f3e64
[Fix] Set the default value of encoding in Config to utf-8 (#653) 2022-11-01 17:29:17 +08:00
BigDong 376251961d
[Enhance] Add `ignore_keys` in ConcatDataset (#556)
* [Fix] Fix ConcatDataset error in VOCDataset

* minor fix

* minor fix

* minor fix

* add UT

* minor fix

* minor fix

* minor fix

* Update mmengine/dataset/dataset_wrapper.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* minor fix

* Update mmengine/dataset/dataset_wrapper.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-11-01 17:06:02 +08:00
Sanbu da9d61f65c
[Doc]: Fix docstring of Config (#654) 2022-11-01 16:56:52 +08:00
Z-Fran 090104df21
[Fix] Fix the calculation error of eta_min in CosineRestart (#639)
* [Fix] fix CosineRestart eta_min

* add ut case

* Enhance unit test

Enhance unit test

* remove unused code

Co-authored-by: HAOCHENYE <21724054@zju.edu.cn>
2022-11-01 15:48:39 +08:00
Sanbu 64ac14303f
[Fix] Fix open() encoding problem of Config in Windows (#648)
* fix open in windows

* Update config.py

* Update config.py

* Update config.py
2022-10-31 14:53:59 +08:00
Shaun 52a79d0ca2
[Docs] Fix typo (#650) 2022-10-31 14:51:43 +08:00
Mashiro d1d32df973
Change strict_load of EMAHook to False by default (#642)
* [Fix] resume std and mean

* refine docstring

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-10-28 19:58:43 +08:00
Mashiro 4aad15df90
[Enhancement] Deprecate _save_to_state_dict implemented in mmengine (#610)
* [Refine] Make get_state_dict directly call nn.Module._save_to_state_dict

* deprecate _save_to_state_dict

* deprecate _save_to_state_dict in 0.5.0

* deprecate in 0.3.0

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-10-28 17:14:08 +08:00
Mashiro d1dd240796
[Fix] Fix `BaseDataPreprocessor.cast_data` cound not handle string data (#602)
* [Fix] Fix  cound not handle string data

* Minor refine

* Refine type hint

Refine type hint

* fix as comment

* Minor refine

* Update mmengine/model/base_model/data_preprocessor.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-10-28 15:17:27 +08:00
Mashiro 1bf5c0c12e
[Fix] Fix error implementation of `is_model_wrapper` (#640)
* [Fix] Fix is_model_wrapper

* [Fix] Fix is_model_wrapper
2022-10-28 15:16:56 +08:00
Hakjin Lee 0857f9fb40
[Feature] Support torch ZeroRedundancyOptimizer (#551)
* [Feature] Support torch ZeRORedundancyOptimizer

Co-authored-by: Junhwa Song <ethan9867@gmail.com>
Signed-off-by: Junhwa Song <ethan9867@gmail.com>
Signed-off-by: Hakjin Lee <nijkah@gmail.com>

* lint

* Fix saving optimizer state_dict

* Fix handling import error

* Add test case

* fix UT

* Revert "fix UT"

This reverts commit dd64538960.

* fix handling import in UT

* Fix saving zero checkpoint and delete redundant master_only

* lint

* test unittest

* Fix handling impor error

* Fix UT condition

* Edit docstrings

* Fix typo

* Skip redundant procudure in checkpoint hook

* fix typo again

* Update mmengine/optim/optimizer/zero_optimizer.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Add api info

* lint

* Fix lint

* Handling AmpOptimWrapper case

* handling overlap_with_ddp

* Fix error

Signed-off-by: Junhwa Song <ethan9867@gmail.com>
Signed-off-by: Hakjin Lee <nijkah@gmail.com>
Co-authored-by: Junhwa Song <ethan9867@gmail.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-10-27 20:31:50 +08:00
tripleMu bf369da22a
Fix typo (#644)
Fix typo
2022-10-27 00:31:05 +08:00
Zaida Zhou 9cd071fb5d
[Docs] Add mmengine logo in docs (#641)
* [Docs] Add mmengine logo in docs

* Remove generated changelog.md
2022-10-26 14:51:25 +08:00
Mashiro c1447734c2
[Enhance] Call `register_all_modules` in `Registry.get()` (#541)
* call register_all_modules  in Registry.get()

* Fix ci

* fix scope bug (scope_name -> scope), for temp sync

* Fix unit test

* Refine log information

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Fix typo

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-10-24 20:15:14 +08:00
Mashiro bda92b49e7
[Feature] Add a function to mark the deprecated function. (#609)
* [Enhancement] Add a deprecated function

* Refine and add ut

* tmp save

* minor refine

* Fix unit test

* Fix unit test

* fix docstring

* Update utils.rst
2022-10-24 14:49:48 +08:00
wangjiangben-hw 601db12d38
[Feature] Support engine with NPU backend. (#572)
* init npu

* Update mmengine/optim/optimizer/amp_optimizer_wrapper.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Update mmengine/dist/dist.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* change to is_hccl_backend

* Update mmengine/optim/optimizer/amp_optimizer_wrapper.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* add comment with AmpOptimWrapper

* Update mmengine/runner/amp.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Update mmengine/runner/amp.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* add npu fn in base_model

* Update mmengine/optim/optimizer/amp_optimizer_wrapper.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* clean lint

* Update mmengine/optim/optimizer/amp_optimizer_wrapper.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Update mmengine/model/base_model/base_model.py

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>

* add is_npu_available

* try to fix

* Add comments

* Refine grammar

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: HAOCHENYE <21724054@zju.edu.cn>
2022-10-24 11:42:29 +08:00
shenmishajing d270516fe8
[Fix]: fix add_config func is not called bug (#613)
* fix add_config func is not called bug
fix wandb add_config bug
add wandb log_code feature

* move log_code_name param to the last one
add log_code_name param to docstring

* add config only when there is a cfg

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* add unit test for log_code_name param of WandbVisBackend

* Update mmengine/visualization/vis_backend.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* use log_code_kwargs instead of only log_code_name
add PATH_FILTERS registry

* use log_code_kwargs instead of only log_code_name
add PATH_FILTERS registry

* fix add config unit test

* roll back to log_code_name version

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-10-24 09:58:10 +08:00