* Enhance config
* add unit test data
* Refacotr unitest of checkpointhook
* add comments
* Fix unit test
* remove _get_metric_scope
* tmp save
* Revert "remove _get_metric_scope"
This reverts commit eeb7a8c5ed2766bf773a9ed28f731fddacd10ac1.
* Revert "Revert "remove _get_metric_scope""
This reverts commit 5398255f6fb3dac8341f7d808f0d7d09350fcaae.
* Revert "tmp save"
This reverts commit cdc9919be8e0a78bbf264c060de2a4396c137d5a.
* clean the code
* Fix ut
* minor fix
* use str.replace
* align the evaluation result in log
* align the evaluation result in log
* align the evaluation result in log
* align the evaluation result in log
* fix test log_processor
* [Enhance] Make sure the FileHandler still alive after
* Resume filter
* avoid bc
* Fix unit test
* clean the code
* revert changes and set mode from 'm' to 'a'
* mode to file_mode
* add comments
* refine comments
* Fix duplicated the
* [Enhance] Make sure the FileHandler still alive after
* minor refine
* minor refine
* refine unit test
* update CI
* update CI
* Fix CI
* fix build_windows
* fix build_windows
* fix build_windows
* fix build_windows
* debug
* debug
* debug
* debug
* debug
* debug
* debug
* test windows CI
* Fix
* Debug
* Fix unit test
* Fix unit test
* Fix CI
* update image version
* update action/checkout and action/setup-python
* add condition to skip test compile
* [Fix] Update CI and fix unit test
* check compiling by attempting compilation
* check compiling by attempting compilation
* check compiling by attempting compilation
* use windows-2022 in runs on
* Apply suggestions from code review
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* update yml
* remove unnecessary assert
* assert grad is None according to the PyTorch version
* Fix code
---------
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* [Fix] Fix inferencer get wrong configs path
* Update CI
* Fix indent
* Fix CI arguments
* gpu test in CI
gpu test in CI
* require lint
* Adjust pytorch version and cuda version
* Fix docker
* Fix docker syntax
* Use bach -c
* Use bach -c
* Replace is_installed with is_imported
* Fix
* Fix PYTHONPATH
* Add hostname
* Update mmengine/logging/logger.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Fix lint
* support record device id
* Fix unit test
* Clean the code
* Fix as comment
* Fix as comment
* Fix unit test
* Update doc
* Fix unit test
* Adjust sequence
* Replace \ with ()
* remove unnecessary ()
* does not change filename in single gpu training
* Fix ci
* fix docs
* Fix as comment
---------
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Log with prefix
* Fix test of loggerhook
* minor refine
* minor refine
* Fix unit test
* clean the code
* deepcopy in method
* replace regex
* Fix as comment
* Enhance readable
* rename reserve_prefix to remove_prefix
* Fix as comment
* Refine unit test
* Adjust sequence
* clean the code
* clean the code
* revert renaming reserve prefix
* Count the dataloader length in _get_dataloader_size
* enable compile configurations to support torch.compile in Runner
* enable compilation in train, val and test
* fix as comments
* add docstring to illustrate usage
* minor refine error message
* add unittests
* fix ut skip
* add logging message to inform users
* compile `train_step`, `val_step`, `test_step` instead
* fix as comments
* revert to compile `train_step` only due to pt2 issue
* add documentation about torch.compile
* [Fix]Silence error when ManagerMixin built duplicate name instance
* [Fix]Silence error when ManagerMixin built duplicate name instance
* Update mmengine/utils/manager.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
---------
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* 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
* [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
* 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
* 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
* 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
* [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>
* Separate init_cfgs to pretrained_cfg and other_cfgs
* Fix unit test
* update documentation
* Fix render of initialize.md
* Fix as comment
* rename initialize.md to weight_initialization.md
* add file
* fix ci
* rename weight_initialization.md to initialize.md
* Fix duplicated .md
* 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>
* 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