* [CI] Update Github Action CI and CircleCI
* clear outdated commands in CI
* clear outdated commands in CI
* add '-r' when installing packages from txt
* update
* update circleci
* fix mismatch conflicts
* update
* install system dependencies
* update
* set env
* fix ut
* update cuda version on Windows
* update push action
* fix unit test install mmdet and mmcls
* raise error when mmdet is not installed
* rename check_and_install to install_package
* split test case
Co-authored-by: C1rN09 <zhaoqian@pjlab.org.cn>
* [Refactor]: modify interface of Visualizer.add_datasample (#365)
* [Refactor] Refactor data flow: refine `data_preprocessor`. (#359)
* refine data_preprocessor
* remove unused BATCH_DATA alias
* Fix type hints
* rename move_data to cast_data
* [Refactor] Refactor data flow: collate data in `collate_fn` of `DataLoader` (#323)
* acollate data in dataloader
* fix docstring
* refine comment
* fix as comment
* refactor default collate and psedo collate
* foramt test file
* fix docstring
* fix as comment
* rename elem to data_item
* minor fix
* fix as comment
* [Refactor] Refactor data flow: `data_batch` argument of `Evaluator.process is a `dict` (#360)
* refine evaluator and metric
* compatible with new default collate
* replace default collate with pseudo
* Handle data_batch in metric
* fix unit test
* fix unit test
* fix unit test
* minor refine
* make data_batch optional
make data_batch optional
* rename outputs to predictions
* fix ut
* rename predictions to outputs
* fix docstring
* fix docstring
* fix unit test
* make outputs and data_batch to kwargs
* fix unit test
* keep signature of metric
* fix ut
* rename pred_sample arguments to data_sample(Visualizer)
* fix loop and ut
* [refactor]: Refactor model dataflow (#398)
* [Refactor] Refactor data flow: refine `data_preprocessor`. (#359)
* refine data_preprocessor
* remove unused BATCH_DATA alias
* Fix type hints
* rename move_data to cast_data
* refactor model data flow
tmp_commt
tmp commit
* make val_cfg and test_cfg optional
* roll back runner
* pass test mmdet
* fix as comment
fix as comment
fix ci in DataPreprocessor
* fix ut
* fix ut
* fix rebase main
* [Fix]: Fix test val ddp (#462)
* [Fix] Fix docstring and type hint of data flow (#463)
* Fix docstring of data flow
* change signature of hook
* fix unit test
* resolve conflicts
* fix lint
* Rename data to structure
* adjust the way to import module
* adjust the way to import module
* rename Structure to Data Structures in docs api
* rename structure to structures
* support using some modules of mmengine without torch
* fix circleci config
* fix circleci config
* fix registry ut
* minor fix
* move init method from model/utils to model/weight_init.py
* move init method from model/utils to model/weight_init.py
* move sync_bn to model
* move functions depending on torch to dl_utils
* format import
* fix logging ut
* add weight init in model/__init__.py
* move get_config and get_model to mmengine/hub
* move log_processor.py to mmengine/runner
* fix ut
* Add TimeCounter in dl_utils/__init__.py
* Support log enviroment information when initiate runner
* Fix unit test
* fix as comment, save world_size
* log gpu num
* clear code and reformat log
* minor refine
* fix as comment
* minor refine
* clean the code
* clean the code
* remove save world_size in meta
* add build function for scheduler
* add unit test
add unit test
* handle convert_to_iter in build_scheduler_from_cfg
* restore deleted code
* format import
* fix lint
* BaseAveragedModel support load ckpt without module prefix
* refine docstring
* allow EMAHook does not load ckpt strictly
* add unit test for strict argument of EMAHook
* sync remote
* sync remote
* clean the code
* ema hook supports setting start iter
* fix unit test
* fix as comment
* fix as comment
* describe kwargs
* support save best based on multi metrics
* add unit test
* resolve bugs after rebasing
* revise docstring
* revise docstring
* fix as comment
* revise as comment
* fix build multiple scheduler
* add new unit test
* fix comment and error message
* fix comment and error message
* extract _parse_scheduler_cfg
* always call build_param_scheduler during train and resume. If there is only one optimizer, the defaut value for sheduler will be a list, otherwise there is multiple optimizer, the default value of sheduler will be a dict
* minor refine
* rename runner test exp name
* fix as comment
* minor refine
* fix ut
* only check parameter scheduler
* minor refine
* fix save scheduler state dict with optim wrapper
* remove for loop and inherit TestParameterScheduler
* remove for loop and inherit TestParameterScheduler
* minor refine
* [Enhance] Auto set the `end` of param schedulers.
* Add log output and unit test
* Update docstring
* Update unit tests of `CosineAnnealingParamScheduler`.
* first commit
* Support modify base config and add unit test
* remove import mmengine in config
* add unit test
* fix lint
* add unit test
* move RemoveAssignFromAST to config utils
* git add utils
* fix format issue in test file
* refine unit test
* refine unit test
* clean code
* fix as comment
* fix as comment
* add get_registry_by_scope method
* add unit test and docstring example
* rename get_registry_by_scope to switch_scope_and_registry
* move build function to registry/builder
* fix docstring
* rename builder->registry_builder, move build_from_cfg to registry_builder
rename builder->registry_builder, move build_from_cfg to registry_builder
* rename registry_builder to build_function
rename registry_builder to build_function
* fix docstring and type hint
* rename build_function to build_functions
* Fix ema hook and add unit test
* save state_dict of ema.module
save state_dict of ema.module
* replace warning.warn with MMLogger.warn
* fix as comment
* fix bug
* fix bug
* add autocast wrapper
* fix docstring
* fix docstring
* fix compare version
* fix unit test
* fix incompatible arguments
* fix as comment
* fix unit test
* rename auto_cast to autocast
* [Refactor]:Refactor `after_val_epoch` to make it output metric by epoch
* add an option for user to choose the way of outputing metric
* rename variable
* reformat docstring
* add type alias
* reformat code
* add test function
* add comment and test code
* add comment and test code
* [Feat] Support FSDP Training
* fix version comparison
* change param format and move `FSDP_WRAP_POLICY` to wrapper file
* add docstring and type hint,reformat code
* fix type hint
* fix typo, reformat code
* merge context
* update unit test
* add docstring
* fix bug in AmpOptimWrapper
* add docstring for backward
* add warning and docstring for accumuate gradient
* fix docstring
* fix docstring
* add params_group method
* fix as comment
* fix as comment
* make default_value of loss_scale to dynamic
* Fix docstring
* decouple should update and should no sync
* rename attribute in OptimWrapper
* fix docstring
* fix comment
* fix comment
* fix as comment
* fix as comment and add unit test
* fix build train_loop during test
* fix build train_loop during test
* fix build train_loop during test
* fix build train_loop during test
* Fix as comment
* fix BaseDataPreprocessor
* fix BaseDataPreprocessor
* change device type to torch.device
* change device type to torch.device
* fix cpu method of base model
* Allow ImgDataPreprocessor do not normalize
* remove unnecessary type ignore
* make mean and std optional
* refine docstring
* fix BaseDataPreprocessor
* fix BaseDataPreprocessor
* change device type to torch.device
* change device type to torch.device
* fix cpu method of base model
* add base model, ddp model and unit test
* add unit test
* fix unit test
* fix docstring
* fix cpu unit test
* refine base data preprocessor
* refine base data preprocessor
* refine interface of ddp module
* remove optimizer hook
* add forward
* fix as comment
* fix unit test
* fix as comment
* fix build optimizer wrapper
* rebase main and fix unit test
* stack_batch support stacking ndim tensor, add docstring for merge dict
* fix lint
* fix test loop
* make precision_context effective to data_preprocessor
* fix as comment
* fix as comment
* refine docstring
* change collate_data output typehints
* rename to_rgb to bgr_to_rgb and rgb_to_bgr
* support build basemodel with built DataPreprocessor
* fix as comment
* fix docstring
* fix build optimizer wrapper without type
* refine logic
* fix as comment
* fix optim_wrapper config error in docstring and unit test
* refine docstring of build_optim_wrapper
* add the epoch/iter that begins validating
* fix lint
* add property and fix unit test
* minor changes
* fix typos and add unit test
* add unit test about begin
* fix docstring
* [Feature] Support EMA and SWA.
* add ema hook
* add avg model ut
* add more unit tests
* resolve comments
* fix warmup ema
* rename
* fix comments
* add assert
* fix typehint
* add comments
* [Feature] Support convert epoch-based schedulers to iter-based.
* Support convert and refactor LR and Momentum to mixin.
* Add unit tests
* fix args and add runner ut
* resolve comments
* [Enhancement] Handle the device type of inputs in functions
* rename and move three fucntions to dist/utils.py
* minor refinement
* rename dist to torch_dist in utils.py
* update unit tests
* refine unit tests
* add unit tests
* fix unit tests
* replace Sequence with list and tuple
* rename get_backend_device to get_comm_device
* fix unit tests
* fix unit tests
* refactor and add more unit tests
* cast_data_device does not support set type
* [Fix] param_scheduler can not None when training models
* update unit tests
* fix unit tests
* refactor ParamSchedulerHook
* refactor unit tests
* param_schedulers can be an empty list
* rename global accessible and intergration get_sintance and create_instance
* move ManagerMixin to utils
* fix as docstring and seporate get_instance to get_instance and get_current_instance
* fix lint
* fix docstring, rename and move test_global_meta
* rename LogBuffer to HistoryBuffer, rename MessageHub methods, MessageHub support resume
* refine MMLogger timestamp, update unit test
* MMLogger add logger_name arguments
* Fix docstring
* change default logger_name to mmengine
* Fix docstring comment and unitt test
* fix docstring
fix docstring
* fix docstring
* Fix lint
* Fix hook unit test
* Fix comments
* should not accept other arguments if corresponding instance has been created
* fix logging ddp file saving
* fix logging ddp file saving
* fix docstring
* fix unit test
* fix docstring as comment
* automatic update iter and epoch in message_hub
* add docstring
* Update comment and docstring
* Fix as comment
* Fix docstring and comment
* refine comments
* [Enhancement] Provide MultiProcessTestCase to test distributed related modules
* remove debugging info
* add timeout property
* [Enhancement] Refactor the unit tests of dist module with MultiProcessTestCase
* minor refinement
* minor fix
* add get_subset method, add comment, rename variable
* add unit test
* Please mypy
* Fix as comment, support negative index, and fix index access error
* add and refine docstring, handle indices=0
* handle indices=0
* add empty list indices test
* rename in_meta in docstring and comments to in_metainfo
* clean meta nameing
* Fix negative indices error
* test empty list of get_subset
* fix comments and docstring
* add unit test
* Fix as comment
* Fix as comment
* add docstring to mention wrapped dataset should not inherit from Basedataset
* Fix wrapped dataset docstring
* Fix wrapped dataset docstring
* Fix method name, docstring, and comments
* Fix comments
* Fix comments
* Fix comments
* [Enhancement] Rename build_from_cfg to from_cfg
* refactor build_logger and build_message_hub
* remove time.sleep from unit tests
* minor fix
* move set_randomness from setup_env
* improve docstring
* refine comments
* print a warning information
* refine comments
* simplify the interface of build_logger
* add defaut scope
* Fix docstring
* override get_current_instance method in DefaultScope
clean meta nameing
* remove default mmengine argument of DefaltScope
remove default mmengine argument of DefaltScope
remove default mmengine argument of DefaltScope
* Fix unit test
Fix unit test
* Fix example in docstring
* add explaination of DefaultScope
* [Fix]: Change after inter and epoch to after train iter and epoch
* [Fix]: Add new UT to param scheduler hook
* [Fix]: Change the type of runner in docstring to Runner
Co-authored-by: Your <you@example.com>
* first commit
* update logging
* update MessageHub unit test and LogBuffer unitest
* update logging docs
* update logging impl and test
* update test logging
* update test
* update logging test and impl
* Fix logging test
* Update log_buffer.py
* rename statistics argumentes
* fix as comment
* Fix as comment
* Fix as comment
* Fix as comment
* Fix meta class
* Fix as comment
* Fix as comment
* Fix as comment
* Fix name declare
* Fix as comment
* Fix as comment
* Fix as comment
* Fix docstring
* Fix as comment
* Fix as comment
* [Feature] Add distributed module
* fix IS_DIST error
* all_reduce_dict does operations in-place
* support 'mean' operation
* provide local group process
* add tmpdir argument for collect_results
* add unit tests
* refactor unit tests
* simplify steps to create multiple processes
* minor fix
* describe the different of *gather* in mmengine and pytorch
* minor fix
* add unit tests for nccl
* test nccl backend in multiple gpu
* add get_default_group function to handle different torch versions
* minor fix
* [Feature] Add distributed module
* fix IS_DIST error
* all_reduce_dict does operations in-place
* support 'mean' operation
* provide local group process
* add tmpdir argument for collect_results
* add unit tests
* refactor unit tests
* simplify steps to create multiple processes
* minor fix
* describe the different of *gather* in mmengine and pytorch
* minor fix
* add unit tests for nccl
* test nccl backend in multiple gpu
* add get_default_group function to handle different torch versions
* minor fix
* minor fix
* handle torch1.5
* handle torch1.5
* minor fix
* fix typo
* refactor unit tests
* nccl does not support gather and gather_object
* fix gather
* fix collect_results_cpu
* fix collect_results and refactor unit tests
* fix collect_results unit tests
* handle torch.cat in torch1.5
* refine docstring
* refine docstring
* fix comments
* fix comments
* [Feature]: Add Part3 of Hooks
* [Feature]: Add Hook
* [Fix]: Add docstring and type hint for base hook
* add sync buffer hook
* update typing hint and docs
* fix lint
* fix mypy
* fix lint
* use mock from unittest
Co-authored-by: seuyou <3463423099@qq.com>
* [Feature]: Add checkpoint hook
* [Fix]: Fix lint
* [Fix]: Delete redundant optional and give an example to our_dir
* [Feature]: Add test the last_ckpt in UT
* [Fix]: Fix docstring problem
* [Fix]: Add patch to UT
* [Feature]: Add Test case for by epoch
* [Feature]: Add Part3 of Hooks
* [Feature]: Add Hook
* add iter timer hook
* update test
* [Fix]: Add docstring and type hint for base hook
* fix mypy
* improve doc coverage and merge main
Co-authored-by: seuyou <3463423099@qq.com>