Commit Graph

558 Commits (646927f62f8d9016b7452c55366a9d033feda8fe)
 

Author SHA1 Message Date
Zaida Zhou 646927f62f
[Enhance] Ensure metrics is not empty when saving best ckpts (#849)
* [Enhance] Ensure metrics is not empty when saving best ckpts

* fix warn to warning

* delete a unnecessary method
2022-12-28 11:34:08 +08:00
Mashiro a9b6753fbe
Make TTAModel compatible with FSDP (#611)
* Add build_runner_with_tta and PrepareTTAHook

* rename hook file

* support build tta runner with runner type

* add unit test

* Add build_runner_with_tta to index.rst

* minor refine

* Add runner test cast

* Fix unit test

* fix unit test

* tmp save

* 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

* pass through unit test

* fix as comment

* remove breakpoint

* remove mmengine/testing/runner_test_cast.py

* minor refine

* minor refine

* minor refine

* set default data preprocessor for model

* minor refine

* minor refine

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

* fix lint

* Fix unit test

* replace  with  in ImgDataPreprocessor

* Fix as comment

* add inference tutorial in advanced tutorial

* update index.rst

* add tta example

* refine tta tutorial

* Add english tutorial

* add note for build_runner_with_tta

* Fix as comment

* add examples

* remove chinese comment

* Update docs/en/advanced_tutorials/test_time_augmentation.md

Co-authored-by: RangiLyu <lyuchqi@gmail.com>

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: RangiLyu <lyuchqi@gmail.com>
2022-12-27 21:39:43 +08:00
BayMax_BHL 16589ce386
[Feature] Add ProfilerHook (#768)
* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* [Feature] Add profiler hook functionality

* Apply suggestions from code review

* Update mmengine/hooks/profiler_hook.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-12-27 18:58:05 +08:00
Mashiro c382f8a5d5
[Fix] Ignore the distributed tests for macOS platform (#821)
* only test timer in linux

* Fix merge_stage_test.yml

* remove install ffmpeg

* test_ci

* test_ci

* Fix python -m pip install pip --upgrade to pip install

* don't test unittest with sleep 1 in windows

* debug with tmate

* increase timeout

* increase timeout

* skip test gloo

* skip test gloo

* fix synteax error

* skip test gloo in torch 1.13

* skip test gloo in torch 1.13

* skip testing setup_env in macOS

* skip test test_dist

* skip test setup

* restore triggered during push

* clean the code

* debug macos

* refine macOS CI

* test merge stage test

* trigger CI during push to main

* Fix as comment
2022-12-27 16:18:46 +08:00
Austin Welch eb803f8702
[Enhance] Add progress argument in load_from_http (#770) 2022-12-26 17:07:22 +08:00
RangiLyu e83ac944b6
[Feature] Registry supports import modules automatically. (#643)
* [Feature] Support registry auto import modules.

* update

* rebase and fix ut

* add docstring

* remove count_registered_modules

* update docstring

* resolve comments

* resolve comments

* rename ut

* fix warning

* avoid BC breaking

* update doc

* update doc

* resolve comments
2022-12-23 15:46:29 +08:00
Mashiro 60492f4df7
[Fix] Fix the table format in initialized.md (#844) 2022-12-23 15:39:48 +08:00
Mashiro 7af68d1b5e
[Docs] Fix a link error in initialization tutorial (#843) 2022-12-23 12:17:08 +08:00
Xin Li bb11f4d392
[Docs] Translate optim_wrapper.md (#833)
* init

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* Update docs/en/tutorials/optim_wrapper.md

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

* update link in the Chinese version

* Update docs/en/tutorials/optim_wrapper.md

* Apply suggestions from code review

* Update docs/en/tutorials/optim_wrapper.md

* merge&remove redundant spaces

* Update docs/en/tutorials/optim_wrapper.md

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

* update flat_decay_mult

* Apply suggestions from code review

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-12-22 10:44:23 +08:00
Xiangxu-0103 591024e533
[Docs] Update docstring of structures (#840)
* Update docstring of `structures`

* update docs

* add `import torch` to `examples`
2022-12-21 20:07:18 +08:00
Xiangxu-0103 e1f61252d4
[Docs] fix typo (#841)
* Update README.md

* Update index.rst
2022-12-20 15:45:15 +08:00
Xiangxu-0103 92674eda54
[Docs] Update docstring of BaseDataElement (#836)
* update doc

* update doc

* Update mmengine/structures/base_data_element.py

* Update mmengine/structures/base_data_element.py

* Apply suggestions from code review

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-12-20 13:26:19 +08:00
Mashiro 2eede1b97e
[Fix] Fix MessageHub sets resumed key twice (#839)
* Fix message hub

* Remove _set_resumed_keys in update_scalars and update_info_dict

* remove  in update_scalars

* clean unnecessary code
2022-12-20 12:21:29 +08:00
Zaida Zhou b44048aeb7
[Fix] Fix failed unit tests caused by the new released numpy (#838)
* [Fix] Fix failed unit tests caused by the new released numpy

* minor fix
2022-12-20 11:00:47 +08:00
Qian Zhao 4147e976a6
[Fix] ZeroRedundancyOptimizer ambiguous error with param groups when pytorch < 1.12.0 (#818)
* fix zero_optimizer error with param groups when pytorch < 1.12.0

* add docstring

* fix docstring

* add unittest

* change ut to use a valid paramwise_cfg

* modify ut

* fix as comments
2022-12-19 17:07:58 +08:00
Mashiro 89477b5c5e
[Docs] Update issue template of documentation (#822)
* update docs template

* Update .github/ISSUE_TEMPLATE/3-documentation.yml

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-12-19 14:45:04 +08:00
RangiLyu 3582b4c787
[Enhance] Support setting decay multiplier for flatten parameter (#771)
* [Fix] Fix bias decay mult of depth-wise conv.

* support flatten param weight decay multiplier

* add unit tests

* REMOVE TODO

* update doc
2022-12-16 17:37:22 +08:00
Mashiro d76bfc9658
[Fix] Add torchvision_0.12.json (#820)
* Add torchvision_0.12.json

* update MANIFEST.in
2022-12-13 19:13:14 +08:00
Mashiro 95c71c82d0
[Fix] Only test Timer in Linux platform (#823) 2022-12-13 19:11:09 +08:00
Xin Li 8026b20e68
[Docs] Translate registry.md (#817)
* translate init

* Update docs/en/advanced_tutorials/registry.md

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>

* Update docs/en/advanced_tutorials/registry.md

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>

* Update docs/en/advanced_tutorials/registry.md

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>

* update link in the chinese version

* Update docs/en/advanced_tutorials/registry.md

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

* Update docs/en/advanced_tutorials/registry.md

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

* Update docs/en/advanced_tutorials/registry.md

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

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-12-13 15:59:04 +08:00
Zaida Zhou bf5c26538e
[Docs] Fix docstring format (#816)
* [Docs] Fix docstring format

* minor refine

* minor refine
2022-12-12 19:28:31 +08:00
Zaida Zhou 3987602814
[Docs] Translate the documentation of hook design (#780)
* [Docs] Translate the docs of hook design

* Apply suggestions from code review

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>
2022-12-12 16:27:16 +08:00
Xin Li 63c9773901
[Docs] Translate save_gpu_memory.md (#803)
* init

* init

* Update docs/en/examples/save_gpu_memory.md

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

* Update docs/en/examples/save_gpu_memory.md

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

* Update docs/en/examples/save_gpu_memory.md

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

* Update docs/en/examples/save_gpu_memory.md

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

* revise the chinese version on gradiant checkpointing

* Update docs/zh_cn/examples/save_gpu_memory.md

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

* Apply suggestions from code review

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>
2022-12-12 15:55:58 +08:00
Timothy f1152c8877
[Docs] Fix wrong links and typos in doc (#815)
* update link

* fix typos

* Update docs/en/advanced_tutorials/basedataset.md

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

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-12-12 15:38:58 +08:00
谢昕辰 504fdc371a
[Fix] Avoid creating a new logger in PretrainedInit (#791)
* use current logger

* remove get_current_instance

* remove logger parameter at weight_init

* remove elif branch
2022-12-12 14:16:15 +08:00
Mashiro d876d4e0f8
[Enhance] Add support of TorchVision's Model Registration API (#793)
* enhance get_torchvision_model

* remove mmcv
2022-12-11 22:08:51 +08:00
Timothy be0bc3a0ef
[Docs] Fix typos (#814)
* Update model.md

* Update model.md

* Update model.md

* Update evaluation.md

* Update param_scheduler.md

* Update hook.md

* Fix lint issue

* fix lint issues

Co-authored-by: shanmo <shanmo1412@gmail.com>
2022-12-11 17:12:29 +08:00
Zaida Zhou 7e2d47ba5f
[Docs] Fix failed link in registry (#811)
* [Docs] Fix failed link in registry

* fix typo
2022-12-10 22:25:31 +08:00
Zaida Zhou 65eb39bfc6
[Docs] Fix docstring format and rescale the image (#802) 2022-12-08 14:29:27 +08:00
Ming-Hsuan-Tu 381c5f103c
[Enhance] Support passing kwargs to update_params (#796)
* [Enhance]

Support step arugments and zero arguments with update_params

* Update mmengine/optim/optimizer/optimizer_wrapper.py

* Update mmengine/optim/optimizer/optimizer_wrapper.py

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-12-08 13:15:42 +08:00
Youfu 57f6644ea0
Fix the wrong examples for Visualizer.draw_polygons (#798)
* examples wrong

* Update visualizer.py

Thanks, learn more.
solve "lint failed"

* Update visualizer.py
2022-12-08 11:44:59 +08:00
Mashiro 491d71c0ef
[Docs] Replace markdown table with html table (#800) 2022-12-07 22:36:16 +08:00
Mashiro c22e900f2e
Add torch1.13 checking in CI (#752)
* Update CI

* Update CI

* restore python -m pip to pip

* refine
2022-12-07 20:58:57 +08:00
Ma Zerun 6a3028c0ab
[Docs] Translate data transform docs. (#737)
* [Docs] Translate data transform tutorial and migration docs.

* Update according to comments

* Update image link
2022-12-07 11:42:24 +08:00
Ma Zerun fe26c6559e
[Enhance] Support multiple `--cfg-options`. (#759) 2022-12-07 10:44:25 +08:00
Range King bced7d6ef0
[Doc] fix typos in EN contributing.md (#792) 2022-12-06 17:39:03 +08:00
jason_w 8f36b2d3c0
[Docs] Fix document link (#775)
* Fix the document link

* Update mmengine/dataset/base_dataset.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-12-06 17:36:14 +08:00
zhouzaida 41c60cc3aa [Docs] Update documentations links in README 2022-12-06 17:22:02 +08:00
RangiLyu 1acdb94d45 [Docs] Translate scheduler tutorial (#466)
* [Doc] Translate scheduler doc

* Apply suggestions from code review

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>

* Update docs/en/tutorials/param_scheduler.md

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>
2022-12-06 17:22:02 +08:00
Mashiro 04714ef6cf [Docs] Translate migration docs of model (#728)
* first commit

* Update two column table wrapper

* update two-column table wrapper

* update chinese

* update chinese migrate model with new css

* Apply suggestions from code review

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>

* Update model.md

* Update docs/en/migration/model.md

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>
2022-12-06 17:22:02 +08:00
Mashiro af408786a2 [Docs] Translate model tutorial (#738)
* translate model first time

* Update docs/en/tutorials/model.md

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-12-06 17:22:02 +08:00
Qian Zhao 7f11b5d1f0 [Docs] Translate runner tutorial (#724)
* partially translated the runner tutorial

* more translation done

* finish translation

* minor refine

* minor refine of chinese doc

* Apply suggestions from code review

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

* fix as comments

* Apply suggestions from code review

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-12-06 17:22:02 +08:00
Mashiro 88fd959d68 [Docs] Translate config tutorial (#689)
* First commit

* Fix as comment

* Apply suggestions from code review

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

* add content in Predefined fields~

* add content in Predefined fields~

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-12-06 17:22:02 +08:00
yancong 9abf5e04c9 [Docs] Translate fileio doc (#753)
* translate the fileio doc

* Update docs/en/advanced_tutorials/fileio.md

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

* Update docs/en/advanced_tutorials/fileio.md

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-12-06 17:22:02 +08:00
Qian Zhao af2788f721 [Docs] Translate logging design (#719)
* translate logging design

* fix as comments

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

* Apply suggestions from code review

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

* fix as comments

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: liukuikun <24622904+Harold-lkk@users.noreply.github.com>
2022-12-06 17:22:02 +08:00
Mashiro e4cf5fda10 [Docs] translate initialize docs (#687)
* translate initialize

* Fix as comment

* minor refine

* Fix as comment

* Apply suggestions from code review

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-12-06 17:22:02 +08:00
Mashiro b142774a42 [Docs] Translate migration guide of Runner (#720)
* Translate runner

* minor refine

* update two-column table wrapper

* minor refine

* update chinese

* refine chinese runner

* Apply suggestions from code review

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-12-06 17:22:02 +08:00
Qian Zhao d7065cdb7e [Docs] Translate dataset tutorial (#727)
* translate dataset tutorial

* Apply suggestions from code review

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

* fix as comments

* minor refine

* Apply suggestions from code review

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-12-06 17:22:02 +08:00
Mashiro bda8c940d2 [Docs] translate the mangermixin tutorial (#711)
* [Docs] translate the mangermixin tutorial

* Fix as comment

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>

* Minor refine

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

* Remove blank block

* fix lint

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-12-06 17:22:02 +08:00
Zaida Zhou afd66b42b4 [Docs] Translate examples docs (#715)
* [Docs] Translate examples docs

* Update docs/en/examples/resume_training.md

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>
2022-12-06 17:22:02 +08:00