Commit Graph

636 Commits (8beacd3b58379f9315cff47fab5757ba4dc5385e)
 

Author SHA1 Message Date
Mashiro 8beacd3b58
[Fix] Support calculate the flops of `matmul` with single dimension matrix (#970)
* Support calculate the flops of matmul

* Remove unnecessary type ignore

* Update mmengine/analysis/jit_handles.py

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

---------

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2023-03-09 17:29:26 +08:00
Xin Li 6e58c0d24c
[Docs] Translate "how to set random seed" (#930)
* translate random_seed init

* try fix lint err

* update en/index.rst

* translate zhihu answer

* Update docs/en/common_usage/set_random_seed.md

* Update docs/en/common_usage/set_random_seed.md

* Update docs/en/common_usage/set_random_seed.md

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

* Update docs/en/common_usage/set_random_seed.md

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

* Update docs/en/common_usage/set_random_seed.md

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

* Update docs/en/common_usage/set_random_seed.md

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

* Update docs/en/common_usage/set_random_seed.md

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

* Update docs/en/common_usage/set_random_seed.md

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

* Update docs/en/common_usage/set_random_seed.md

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

* Update docs/en/common_usage/set_random_seed.md

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

* reorg last part

* minor refine

* Update set_random_seed.md

* fix lint

---------

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>
Co-authored-by: zhouzaida <zhouzaida@163.com>
2023-03-09 17:23:12 +08:00
Mashiro 12e3d4e1e1
Fix changelog date (#986) 2023-03-08 16:07:49 +08:00
Infinity_lee 4585c369c9
[Enhancement] Save the memory to visualization backends (#974)
* add memory in other log

* fix

* fix

* keep empty line
2023-03-08 14:12:22 +08:00
Mashiro 44f30f649e
[Enhancement] Add `FUNCTIONS` root Registry (#983)
* [Enhancement] Add FUNCTIONS Registry

* Refine as comment

* clean the code
2023-03-08 12:53:24 +08:00
Julius Zhang aeb5c454c5
[Docs] Fix typo in hook document (#980) 2023-03-07 12:53:30 +08:00
Mashiro dbae83c52f
[Enhancement] Replace warnings.warn with print_log (#961)
* Replace warning with print_log

* Add comments for testing warning
2023-03-06 17:25:28 +08:00
Hakjin Lee b3430e4257
[Feature] Support EarlyStoppingHook (#739)
* [Feature] EarlyStoppingHook

* delete redundant line

* Assert stop_training and rename tests

* Fix UT

* rename `metric` to `monitor`

* Fix UT

* Fix UT

* edit docstring on patience

* Draft for new code

* fix ut

* add test case

* add test case

* fix ut

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* Append hook

* Append hook

* Apply suggestions

* Update suggestions

* Update mmengine/hooks/__init__.py

* fix min_delta

* Apply suggestions from code review

* lint

* Apply suggestions from code review

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

* delete save_last

* infer rule more robust

* refine unit test

* Update mmengine/hooks/early_stopping_hook.py

---------

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: zhouzaida <zhouzaida@163.com>
Co-authored-by: HAOCHENYE <21724054@zju.edu.cn>
2023-03-06 13:18:42 +08:00
Zaida Zhou d34fb58773
Update .owners.yml (#978) 2023-03-05 23:43:13 +08:00
Infinity_lee 54b6bbbd65
[Docs] Translate model analysis document to English (#956)
* add model analysis eng doc

* fix doc style

* add link in index.rst

* fix

* fix

* fix

* rename file

* fix
2023-03-05 21:03:26 +08:00
Qian Zhao b1b1f53db2
[Fix] Fix optim_wrapper unittest for pytorch <= 1.10.0 (#975) 2023-03-02 14:14:23 +08:00
Qian Zhao 2ed8e343a0
[Feature] Enable bf16 in AmpOptimWrapper (#960)
* support bf16 in AmpOptimWrapper

* add docstring

* modify docs

* add unittests for bf16 in AmpOptimWrapper

* fix type

* fix to pass ci

* fix ut skip logic to pass ci

* fix as comment

* add type hints

* fix docstring and add warning information

* remove check for pytorch>=1.6 in unittest

* modify unittest

* modify unittest

* remove torch.float32 && torch.float64 from valid dtypes

* fix as comments

* minor refine docstring

* fix unittest parameterized to pass CI

* fix unittest && add back torch.float32, torch.float64
2023-03-01 21:35:18 +08:00
Infinity_lee 8a407ca214
[Docs] Translate "Debug Tricks" to English (#953)
* add english docs

* fix superlink

* fix

* fix
2023-03-01 19:29:04 +08:00
Yuetian Wang 53ae4fb2ec
[Docs] Add a document about setting interval (#964)
* Add a document about setting interval.

Add a document about Setting the Frequency of Logging, Weight Saving, and Validation.

* Update set_interval.md

Fixed a small bug in the hyperlink.

* Update set_interval.md

Fixed the wrong hyperlink

* Update with pre-commit.

* Update docs/en/common_usage/set_interval.md

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

* Update docs/en/common_usage/set_interval.md

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

* Update docs/en/common_usage/set_interval.md

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

* Update docs/en/common_usage/set_interval.md

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

* Update docs/en/common_usage/set_interval.md

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

* Update docs/en/common_usage/set_interval.md

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

* Update docs/en/common_usage/set_interval.md

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

* Update docs/en/common_usage/set_interval.md

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

* Update docs/en/common_usage/set_interval.md

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

* Update docs/en/common_usage/set_interval.md

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

* Update docs/en/common_usage/set_interval.md

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

* Update docs/en/common_usage/set_interval.md

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

* Update index.rst

Added: common_usage/set_interval.md

---------

Co-authored-by: YuetianW <wangyuetian@supermicro.dscvlab.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2023-03-01 19:28:14 +08:00
Zaida Zhou cb7e04d3cf
fix typo (#965) 2023-02-27 17:13:38 +08:00
Mashiro 6a56ca78e3
Bump version to v0.6.0 (#954)
* update version

* Update change log

* Fix as comment

* Add link to username

* Refine

* Adjust highlight sequence

* Fix as comment

* Fix error format in changelog

* delete chinese changelog

* remove link

* Adjust highlight sequence
2023-02-24 14:30:01 +08:00
Mashiro 7e1b27305a
[Enhance] Get model configs from metafile without installation (#901)
* Support get config from model-index without installing downstream repo

* Rename _get_models_from_package to _get_models_from_config_dir

* adjust priority

* Fix as comment

* Refine exception

* Replace osp.xxx with fileio.xxx

* Refine as comment

* Revert "Replace osp.xxx with fileio.xxx"

This reverts commit 6aed9b2e88.

* replace fileio with osp

* fix

* Fix as comment
2023-02-23 22:24:12 +08:00
Zaida Zhou d8abf9ac0f
fix typo (#955) 2023-02-23 15:22:33 +08:00
Zaida Zhou fc9518e2c1
[Feature] Add Lion optimizer (#952) 2023-02-23 11:24:50 +08:00
Qian Zhao 25dfe41c19
Change codeowners (#949) 2023-02-22 14:20:56 +08:00
Zaida Zhou c94e7518e5
[Enhancement] Clear UT warning caused by pytest (#947)
* [Enhancement] Clear UT warning caused by pytest

* revert some changes for unittest

* revert

* update

* clear a numpy warning

* Update tests/test_visualizer/test_vis_backend.py

* fix a warning
2023-02-22 12:17:56 +08:00
Weihang Xia 8370c1e7f7
[Enhance] Make sure Tensors to broadcast is contiguous (#948)
* Make sure Tensors to cast is contiguous

* simplify

---------

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2023-02-22 11:41:06 +08:00
Qian Zhao e271454527
[Fix] Temporarily fix collect_env raises errors and stops programs (#944)
* temporarily fix `collect_env` raise errors and stops programs

* remove the final catch block
2023-02-22 00:25:36 +08:00
Mashiro b14c179fad [Refactor] Refactor ema hook (#804)
* Refacot ema hook unit test

* Refacot ema hook unit test

* Enhance test_after_load_checkpoint

* refine error messsage

* Refine as comment

---------

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

Fix unit test
2023-02-22 00:08:38 +08:00
Mashiro aa69ba1a86 [Refactor] Refactor unit test of ParamSchedulerHook (#809)
* Refactor unit test of param_schemeduler hook

* Refactor unit test of param_schemeduler hook
2023-02-22 00:08:38 +08:00
Mashiro 29f399441f [Refactor] Use a real runner to test RuntimeInfohook (#810)
* Refactor RuntimeInfoHook

* Fix as comment
2023-02-22 00:08:38 +08:00
Mashiro c4efda4186 [Refactor] Use a real runner to test DistSamplerSeedHook (#812)
* Refactor unit test of DistSamplerSeedHook

* rename the case

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2023-02-22 00:08:38 +08:00
Mashiro a094976e9f [Refactor] Use a real runner to test IterTimerHook (#807)
* Refactor iter_timer_hook

* Refactor iter_timer_hook
2023-02-22 00:08:38 +08:00
Mashiro 4b781c336b [Refactor] Refactor unit test of EmptyCacheHook (#805)
* test EmptyCacheHook with runner

* Add coments
2023-02-22 00:08:38 +08:00
Mashiro 425ca99e90 [Refactor] Refactor unit test of Base hook (#806)
* refactor base hooks

* Fix CI
2023-02-22 00:08:38 +08:00
Zaida Zhou 67acdbe245
[Docs] Add a document about debug tricks (#938)
* fix typo

* [Docs] Add debug skills

* minor fix

* refine

* rename debug_skills to debug_tricks

* refine

* Update docs/en/common_usage/debug_tricks.md
2023-02-21 21:40:35 +08:00
Zaida Zhou 4861f034a7
[Docs] Count FLOPs and parameters (#939)
* [Docs] Count FLOPs and parameters

* add the doc to index.rst

* fix table in HTML

* fix

* fix

* fix indent

* refine
2023-02-21 21:16:18 +08:00
Mashiro 346989464c
[Docs] Add the document for the transition between IterBasedTraining and EpochBasedTraining (#926)
* Add epoch 2 iter

* Add epoch 2 iter

* Refine chinese docs

* Add example for training CIFAR10 by iter

* minor refine

* Fix as comment

* Fix as comment

* Refine description

* Fix as comment

* minor refine

* Refine description

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

* Translate to en

* Adjust indent

---------

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2023-02-21 21:12:38 +08:00
luomaoling 3dc2be05d5
[Feature] Add NPUProfilerHook to profile performance in Ascend device (#925)
* Feature NPUProfilerHook

* Feature NPUProfilerHook
2023-02-21 17:20:40 +08:00
Zaida Zhou e16dacf7e3
Refine the repr of Registry (#942)
* Refine the repr of Registry

* fix ut

* fix ut
2023-02-21 13:18:11 +08:00
Zaida Zhou a6d06a424d
Fix failed URL (#943) 2023-02-21 10:48:07 +08:00
Zaida Zhou fd7917a7da
Refine the style of table (#941)
* Refine the style of table

* refine
2023-02-20 20:12:37 +08:00
Songyang Zhang aee2f6a688
[Feature] Support model complexity computation (#779)
* [Feature] Add support model complexity computation

* [Fix] fix lint error

* [Feature] update print_helper

* Update docstring

* update api, docs, fix lint

* fix lint

* update doc and add test

* update docstring

* update docstring

* update test

* Update mmengine/analysis/print_helper.py

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

* Update mmengine/analysis/print_helper.py

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

* Update mmengine/analysis/print_helper.py

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

* Update mmengine/analysis/print_helper.py

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

* Update mmengine/analysis/print_helper.py

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

* Update mmengine/analysis/print_helper.py

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

* Update mmengine/analysis/print_helper.py

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

* Update mmengine/analysis/print_helper.py

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

* Update mmengine/analysis/print_helper.py

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

* Update mmengine/analysis/print_helper.py

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

* Update mmengine/analysis/print_helper.py

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

* Update mmengine/analysis/print_helper.py

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

* Update mmengine/analysis/print_helper.py

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

* Update mmengine/analysis/print_helper.py

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

* Update mmengine/analysis/complexity_analysis.py

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

* Update docs/en/advanced_tutorials/model_analysis.md

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

* Update docs/en/advanced_tutorials/model_analysis.md

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

* update docs

* update docs

* update docs and docstring

* update docs

* update test withj mmlogger

* Update mmengine/analysis/complexity_analysis.py

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

* Update tests/test_analysis/test_activation_count.py

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

* Apply suggestions from code review

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

* update test according to review

* Apply suggestions from code review

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

* fix lint

* fix test

* Apply suggestions from code review

* fix API document

* Update analysis.rst

* rename variables

* minor refinement

* Apply suggestions from code review

* fix lint

* replace tabulate with existing rich

* Apply suggestions from code review

* indent

* Update mmengine/analysis/complexity_analysis.py

* Update mmengine/analysis/complexity_analysis.py

* Update mmengine/analysis/complexity_analysis.py

---------

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: zhouzaida <zhouzaida@163.com>
2023-02-20 15:00:28 +08:00
wxDai 1d97c07068
[Docs] Fix typo shedule (#936) 2023-02-19 20:44:24 +08:00
vansin a3e5e03be6
Add the links of twitter, discord, medium, and youtube (#924)
* docs: update the discord link

* docs: update

* docs: update

* docs: update

* docs: update
2023-02-16 09:59:26 +08:00
whcao a5f48f7d99
[Bug] Fix the bug when the params in shared modules do not require grad (#903)
* fix the bug when the params in shared modules do not require grad

* test DefaultOptimWrapperConstructor when the params in shared modules do not require grad
2023-02-15 11:25:15 +08:00
Qian Zhao 30fe410b17
[Docs] Temporarily skip errors in building pdf docs at readthedocs (#928)
* temporarily skip readthedocs errors in building pdf docs

* fix error links

* remove useless links

* fix

* fix broken links as github url

* Update docs/zh_cn/notes/contributing.md

---------

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2023-02-14 16:55:35 +08:00
Eiuyc c59899a65a
[Enhance] Beautify the print result of the registry (#922)
* beautify the print result of the registry

* remove tabulate and use rich for repr

* remove table width; text align to left

* sort _model_dict items
2023-02-14 16:32:11 +08:00
Zaida Zhou 502edec0b6
[Docs] how to set the interval parameter (#917)
* [Docs] how to set the interval parameter

* fix link

* fix

* fix

* refine

* refine

* Update docs/zh_cn/common_usage/set_interval.md

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

* Update index.rst

---------

Co-authored-by: Qian Zhao <112053249+C1rN09@users.noreply.github.com>
2023-02-14 11:42:49 +08:00
Zaida Zhou 74fcaea0ab
[Docs] Introduce how to set random seed (#914)
* [Docs] Introduce how to set random seed

* add a comment
2023-02-13 16:14:48 +08:00
Zaida Zhou ad0b296fd4
Fix docstring (#913)
* Fix docstring

* fix
2023-02-13 16:10:53 +08:00
Qian Zhao c712070c90
[Docs] Resolve warnings in sphinx build (#915)
* add ZeroOptimizer to optim

* resolve `duplicate label` warnings

* upgrade docutils && shpinx to resolve `unknown directive or role` warnings

* fix typo

* resolve literal_block && heading warnings

* resolve json literal_block warnings

* resolve python literal_block warnings

* resolve bunches of reference warnings

* resolve bunches of docstring warnings

* resolve warnings in autosummary

* resolve remaining warnings in en docs

* resolve heading warnings in zh_cn docs

* resolve remaining warnings in zh_cn docs

* fix as comments

* fix as comments
2023-02-08 20:36:57 +08:00
Zaida Zhou 4749682885
[Docs] Move examples to a new directory (#911)
* [Docs] Move examples to a new directory

* fix typo
2023-02-07 17:03:35 +08:00
xcnick e35ed5fd2e
[Feature] Add ApexOptimWrapper (#742)
* add ApexOptimWrapper

* typo fix

* add apex amp.initialize in optim_context

* assert apex_amp

* polish code

* add parameters of apex_amp.initialize

* add docs

* polish code

* polish code

* polish code

* fix calling of apex amp load_state_dict

* polish

* add comments

* Update apex_optimizer_wrapper.py

* Update apex_optimizer_wrapper.py

---------

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2023-02-06 15:30:10 +08:00
Zaida Zhou bc49e0c0a1
Update the links in the issue templates (#907) 2023-02-06 11:50:00 +08:00