* 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
* 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>
* 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
* [Feature] visualizer.draw_texts() add a font_properties argument in order to show Chinese characters.
* [Fix] move font_properties argument to the end.
* Update docstring of font_properties parameter.
* [Fix] moving FontProperties import clause to draw_texts() and add TYPE_CHECKING
* Update mmengine/visualization/visualizer.py
---------
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Adding missing pre-commit requirement to tests.txt
* Added support for setting a timeout for distributed learning
* Adding documentation about how to change the runtime timeout into the distributed manual.
* Fixed type in documentation to correctly specify an integer
* Removing type-cast after checking the correct type already before
* Update mmengine/dist/utils.py
Adding an explicit `is not None` to the check
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
* Removing explicit type check and replacing it with more pythonic way of assuming it is the right type and handling the exception if the type doesn't match.
* Removing pre-commit from test requirements again
* Simplified the code according to suggestions from PR
* Update distributed.md
---------
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Add read environment variable function in config
* Add UT
* enable int case, split predefined and environment
* Update py config
* Add new attributes env_variables in config
* Add examples in docstring
* Fix comments
* Add tutorials
* Add en tutorials
* Refactor config docs according to comments
* Fix comments
* Change function name
* Bump version to v0.5.0
* Fix as comment
* Change release date
* Update README.md
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* [Feature] Add BaseInferencer (#773)
* Update BaseInferencer
* Fix ci
* Fix CI and rename iferencer to infer
* Fix CI
* Add renamed file
* Add test file
* Adjust interface sequence
* refine preprocess
* Update unit test
Update unit test
* Update unit test
* Fix unit test
* Fix as comment
* Minor refine
* Fix docstring and support load image from different backend
* Support load collate_fn from downstream repos, refine dispatch
* Minor refine
* Fix lint
* refine grammar
* Remove FileClient
* Refine docstring
* add rich
* Add list_models
* Add list_models
* Remove backend args
* Minor refine
* Fix typos in docs and type hints (#787)
* [Fix] Add _inputs_to_list (#795)
* Add preprocess inputs
* Add type hint
* update api/infer in index.rst
* rename preprocess_inputs to _inputs_to_list
* Fix doc format
* Update infer.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* [Fix] Fix alias type (#801)
* [Enhance] Support loading model config from checkpoint (#864)
* first commit
* [Enhance] Support build model from weight
* minor refine
* Fix type hint
* refine comments
* Update docstring
* refine as comment
* Add method
* Refine docstring
* Fix as comment
* refine comments
* Refine warning message
* Fix unit test and refine comments
* add infer.md
* minor refine
* minor refine
* minor refine
* Apply suggestions from code review
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Fix conflicts and minor refine
* minor refine
* Fix as comment
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Tong Gao <gaotongxiao@gmail.com>
* [Feature] Add BaseInferencer (#773)
* Update BaseInferencer
* Fix ci
* Fix CI and rename iferencer to infer
* Fix CI
* Add renamed file
* Add test file
* Adjust interface sequence
* refine preprocess
* Update unit test
Update unit test
* Update unit test
* Fix unit test
* Fix as comment
* Minor refine
* Fix docstring and support load image from different backend
* Support load collate_fn from downstream repos, refine dispatch
* Minor refine
* Fix lint
* refine grammar
* Remove FileClient
* Refine docstring
* add rich
* Add list_models
* Add list_models
* Remove backend args
* Minor refine
* Fix typos in docs and type hints (#787)
* [Fix] Add _inputs_to_list (#795)
* Add preprocess inputs
* Add type hint
* update api/infer in index.rst
* rename preprocess_inputs to _inputs_to_list
* Fix doc format
* Update infer.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* [Fix] Fix alias type (#801)
* [Enhance] Support loading model config from checkpoint (#864)
* first commit
* [Enhance] Support build model from weight
* minor refine
* Fix type hint
* refine comments
* Update docstring
* refine as comment
* Add method
* Refine docstring
* Fix as comment
* refine comments
* Refine warning message
* Fix unit test and refine comments
* replace MODULE2PACKAGE to MODULE2PAKCAGE
* Fix typo and syntax error in docstring
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Tong Gao <gaotongxiao@gmail.com>
* [Feature] Add ReduceOnPlateauParamScheduler and change ParamSchedulerHook
* [Feature] add ReduceOnPlateauLR and ReduceOnPlateauMomentum
* pre-commit check
* add a little docs
* change position
* fix the conflict between isort and yapf
* fix ParamSchedulerHook after_val_epoch execute without train_loop and param_schedulers built
* Apply suggestions from code review
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
* update ReduceOnPlateauParamScheduler, ReduceOnPlateauMomentum and ParamSchedulerHook
* fix get need_step_args attribute error in ParamSchedulerHook
* fix load_state_dict error for rule in ReduceOnPlateauParamScheduler
* add docs for ParamSchedulerHook and fix a few codes
* [Docs] add ReduceOnPlateauParamScheduler, ReduceOnPlateauMomentum and ReduceOnPlateauLR docs
* [Refactor] adjust the order of import
* [Fix] add init check for threshold in ReduceOnPlateauParamScheduler
* [Test] add test for ReduceOnPlateauParamScheduler, ReduceOnPlateauLR and ReduceOnPlateauMomentum
* [Fix] fix no attribute self.min_value
* [Fix] fix numerical problem in tests
* [Fix] fix error in tests
* [Fix] fix ignore first param in tests
* [Fix] fix bug in tests
* [Fix] fix bug in tests
* [Fix] fix bug in tests
* [Fix] increase coverage
* [Fix] fix count self._global_step bug and docs
* [Fix] fix tests
* [Fix] modified ParamSchedulerHook test
* Update mmengine/optim/scheduler/param_scheduler.py
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
* [Fix] modified something according to commented
* [Docs] add api for en and zh_cn
* [Fix] fix bug in test_param_scheduler_hook.py
* [Test] support more complicated test modes(less, greater, rel, abs) for ReduceOnPlateauParamScheduler
* [Docs] add docs for rule
* [Fix] fix pop from empty list bug in test
* [Fix] fix check param_schedulers is not built bug
* [Fix] fix step_args bug and without runner._train_loop bug
* [Fix] fix step_args bug and without runner._train_loop bug
* [Fix] fix scheduler type bug
* [Test] rename step_args to step_kwargs
* [Fix] remove redundancy check
* [Test] remove redundancy check
* Apply suggestions from code review
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* [Test] fix some defects
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>