Commit Graph

31 Commits (c478bdca27eccfbf33a5e395686d87d70d8a9229)

Author SHA1 Message Date
Xin Li d837fc1ca7
[Docs] Visualization docs translate (#692) 2022-11-18 10:45:15 +08:00
Tao Gong f9158e233e
[Docs] Add English docs of BaseDataset (#713)
* add chinese docs of BaseDataset

* fix typo

* fix lint

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update docs/en/advanced_tutorials/basedataset.md

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

* Update basedataset.md

* Update basedataset.md

* Update basedataset.md

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-11-15 20:20:46 +08:00
Mashiro b35196acd6
Bump version to v0.3.1 (#706)
* Bump version to v0.3.1

* Bump version to v0.3.1

* Apply suggestions from code review

Fix as comment

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

* update pr

* update pr

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-11-09 17:09:51 +08:00
Mashiro 4e685931d0
Bump version to v0.3.0 (#661)
* Bump version to v0.3.0

* minor refine

* Fix as comment

* Fix as comment

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

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-11-02 19:34:03 +08:00
Hakjin Lee 0857f9fb40
[Feature] Support torch ZeroRedundancyOptimizer (#551)
* [Feature] Support torch ZeRORedundancyOptimizer

Co-authored-by: Junhwa Song <ethan9867@gmail.com>
Signed-off-by: Junhwa Song <ethan9867@gmail.com>
Signed-off-by: Hakjin Lee <nijkah@gmail.com>

* lint

* Fix saving optimizer state_dict

* Fix handling import error

* Add test case

* fix UT

* Revert "fix UT"

This reverts commit dd64538960.

* fix handling import in UT

* Fix saving zero checkpoint and delete redundant master_only

* lint

* test unittest

* Fix handling impor error

* Fix UT condition

* Edit docstrings

* Fix typo

* Skip redundant procudure in checkpoint hook

* fix typo again

* Update mmengine/optim/optimizer/zero_optimizer.py

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

* Add api info

* lint

* Fix lint

* Handling AmpOptimWrapper case

* handling overlap_with_ddp

* Fix error

Signed-off-by: Junhwa Song <ethan9867@gmail.com>
Signed-off-by: Hakjin Lee <nijkah@gmail.com>
Co-authored-by: Junhwa Song <ethan9867@gmail.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-10-27 20:31:50 +08:00
Zaida Zhou 9cd071fb5d
[Docs] Add mmengine logo in docs (#641)
* [Docs] Add mmengine logo in docs

* Remove generated changelog.md
2022-10-26 14:51:25 +08:00
Mashiro bda92b49e7
[Feature] Add a function to mark the deprecated function. (#609)
* [Enhancement] Add a deprecated function

* Refine and add ut

* tmp save

* minor refine

* Fix unit test

* Fix unit test

* fix docstring

* Update utils.rst
2022-10-24 14:49:48 +08:00
wangjiangben-hw 601db12d38
[Feature] Support engine with NPU backend. (#572)
* init npu

* Update mmengine/optim/optimizer/amp_optimizer_wrapper.py

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

* Update mmengine/dist/dist.py

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

* change to is_hccl_backend

* Update mmengine/optim/optimizer/amp_optimizer_wrapper.py

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

* add comment with AmpOptimWrapper

* Update mmengine/runner/amp.py

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

* Update mmengine/runner/amp.py

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

* add npu fn in base_model

* Update mmengine/optim/optimizer/amp_optimizer_wrapper.py

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

* clean lint

* Update mmengine/optim/optimizer/amp_optimizer_wrapper.py

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

* Update mmengine/model/base_model/base_model.py

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

* add is_npu_available

* try to fix

* Add comments

* Refine grammar

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: HAOCHENYE <21724054@zju.edu.cn>
2022-10-24 11:42:29 +08:00
Xin Li dc01545e26
[Docs] Translate installation and 15_min (#629)
* translate installation and 15_min

* Update docs/en/get_started/installation.md

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

* Update docs/en/get_started/installation.md

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

* Update docs/en/get_started/installation.md

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

* Update docs/en/get_started/installation.md

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

* Update docs/en/get_started/installation.md

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

* Update docs/en/get_started/installation.md

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

* Update docs/en/get_started/installation.md

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

* Update docs/en/get_started/15_minutes.md

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

* Update docs/en/get_started/15_minutes.md

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

* Update docs/en/get_started/15_minutes.md

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

* Update docs/en/get_started/installation.md

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

* Update docs/en/get_started/installation.md

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

* Update docs/en/get_started/15_minutes.md

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

* Update docs/en/get_started/15_minutes.md

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

* Update docs/en/get_started/15_minutes.md

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

* Update docs/en/get_started/installation.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-10-19 10:51:16 +08:00
Mashiro 13484aae9f
Bump version to v0.2.0 (#591)
* Bump version to v0.2.0

* Add changelog

* minor refine

* minor refine

* update date

* clean the code

* minor refine

* update release date

* Fix grammar

* Fix grammar

* Fix grammar

* Fix grammar

* Minor refine

* Fix error format in readme

* update date

* minor refine

* minor refine

* minor refine

* minor refine

* refine grammar
2022-10-11 23:08:17 +08:00
Mashiro 62456217f9
[Feature] Add test time augmentation base model. (#538)
* First commit

* add BaseTestTimeAugModel

* Add unit test

* move loop logic to test_step

* fix ddp test

* rename model to module

* optim __init__

* Fix as comment

* Fix as comment

* make val_step should not be called

* make tta do not inherit base model

* Fix unit test

* Enhance docstring

* Fix as comment

* Fix as comment

* minor refine

* minor refine

* minor refine

* fix unit test

* minor refine

* minor refine

* minor refine

* minor refine

* minor refine

* minor refine

* fix unit test
2022-10-10 14:29:33 +08:00
Zaida Zhou ed84dfd34d
[Refactor] Refactor fileio without breaking back compatibility (#533)
* [Refactor] Refactor fileio but without breaking bc

* handle compatibility

* fix format

* modify io functions

* fix ut

* fix ut

* rename method names

* refine

* refine docstring

* fix ut in windows

* update ut

* minor fix

* ensure client is not None when closing it

* add more examples for list_dir_or_file interface

* refine docstring

* refine deprecated info

* fix ut

* add a description for lmdb docstring
2022-09-26 14:30:40 +08:00
Mashiro 8ee31dbc3b
[Feature] Support convert `BN` to `SyncBN` by config (#506)
* [Feature] Support convert BN to SyncBN by config

* make unit test compatible with cpu

* Fix as comment

* fix unit test

* change signature of convert_sync_batchnorm: rename sync_bn to implemention

* fix unit test

* fix unit test
2022-09-15 18:08:36 +08:00
Zaida Zhou 114fa21522
[Docs] Fix API files of en docs (#525)
* [Docs] Fix api files of en docs

* minor fix
2022-09-13 14:57:18 +08:00
Zaida Zhou ba1c368f94
[Docs] Fix index.rst in docs (#505)
* [Docs] Fix outdated index

* update index.rst

* fix readme url
2022-09-01 11:34:03 +08:00
Zaida Zhou a06bb7782b
[Docs] Add readthedocs.yml (#501)
* [Docs] Add readthedocs.yml

* include torch in readthedocs.yml

* add torch torchvision in docs.txt
2022-08-31 23:34:25 +08:00
Zaida Zhou 458f6d684e
[Docs] Refactor docs structure (#494)
* [WIP] Refactor-docs-structure

* [Docs] Check link and fix rst  (#498)

* check link

* fix rst

* Fix conf.py

* Fix lint

* minor refine

* minor refine

* modify zh_readme and index.rst

* add migration exampls get_started design to en

* add tutorials to en

* correct chinese doc link

* Apply suggestions from code review

* Update docs/en/advanced_tutorials/distributed.md

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

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
2022-08-31 21:18:55 +08:00
Zaida Zhou 3f5e08fa4a
[Docs] Make API of docs clearer (#469)
* [Docs] Make API of docs clearer

* minor fix

* fix md format
2022-08-30 16:27:20 +08:00
Haian Huang(深度眸) 4bd00bc85c
[Docs] Add visualizer docs (#418)
* Add Visualizer tutorials

* Add Visualizer designs

* update

* update

* update

* fix commit

* add demo image

* simplify code according to #440 and add some results picture

* replace image url

* update

Co-authored-by: liukuikun <liukuikun@sensetime.com>
2022-08-26 10:01:04 +08:00
Zaida Zhou 7e1d7af2d9
[Refactor] Refactor code structure (#395)
* 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
2022-08-24 19:14:07 +08:00
Haian Huang(深度眸) c197bdf359
[Feature] Profiling tools (#241)
* Add profiling tools

* fix docstr

* fix docstr

* update

* fix bug

* update

* update

* fix error

* fix mypy

* uodate

* merge main

* fix UT
2022-05-25 10:55:07 +08:00
Zaida Zhou 86ffc19c9c
Add pyupgrade pre-commit hook (#232)
* Add pyupgrade pre-commit hook

* fix ut

* remove comments
2022-05-19 17:56:31 +08:00
Zaida Zhou aee6d7a769
[Docs] Improve type hint style (#125) 2022-03-25 11:26:05 +08:00
Zaida Zhou 248ad9aee8
[Feature] Add Runner and Loop (#86)
* [Feature] Add Runner and Loop

* refine docstring

* refine docstring

* refine __init__ of Runner

* add Runner.save_checkpoint

* add comment for data_batch

* rename validation_cfg to val_cfg

* update branch

* update branch

* discard wear reference

* set seed for torch in dataloader worker

* refine comments

* reorder methods

* import module in __init__.py

* add runner.load_checkpoint

* rename attributes

* fix indent

* fix indent

* add comment for LOOPS

* add example for methods

* add example for methods

* refine examples

* add Runner.resume and refactor register_hooks

* remove type hint of runner in CheckpointHook

* rename before_run to before_train

* remove collate

* add before_run after_run for loop.run

* dummy collate_fn

* add more unit tests

* move call_hook('before_run') to runner

* minor fix

* add comments for collate_fn

* fix type hint

* refactor logic to load or resume checkpoint

* fix typo

* add comments for IterBasedTrainLoop

* refactor unit tests

* fix unit tests

* refactor

* fix setup_env

* refine

* minor fix

* Merge branch 'main' of github.com:open-mmlab/mmengine into zzd/add-runner

* minor fix

* minor fix

* refine

* refactor unit tests

* fix unit tests

* add launcher property

* add logger, message_hub and writer unit tests

* add cur_dataloader attribute for runner

* fix IterBasedTrainLoop

* add torch.no_grad decorator

* add master_only decorator for save_checkpoint

* add before_test_epoch in TestLoop

* refactor load_or_resume method

* refine docstring

* fix typo

* build_dataloader can handle dataset object

* add dump_config for runner

* collate_fn should not a lambda function

* minor fix

* refine docstring

* fix unit tests

* improve comments

* refine unit tests

* rename collate_fn to pseduo_collate

* add 'TODO' tag
2022-03-14 13:19:29 +08:00
liukuikun 7acaca1445
Visualizer (#67)
* [WIP] Visualizer

* add draw featmap

* update docstring

* update docstring

* update docstring

* fix comment

* fix comment

* fix comment

* fix comment

* fix comment
2022-03-07 22:06:32 +08:00
Zaida Zhou e146233546
fix documentation (#91) 2022-03-06 14:36:46 +08:00
Zaida Zhou c6a8d72c5e
[Feature] Add distributed module (#59)
* [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
2022-03-05 22:03:32 +08:00
Ma Zerun f0451a38f0
[Feature] Add data sampler (#30)
* Add DefaultSampler and InfiniteSampler

* Add unit test

* Add samplers to API reference

* Update docstring

* Improve according to comments

* Rename `num_replicas` to `world_size`

* Update docstring.

* Update mmengine/data/sampler.py

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

* Update mmengine/data/sampler.py

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

* Fix typo in unit test

Co-authored-by: Wenwei Zhang <40779233+ZwwWayne@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-02-21 13:08:55 +08:00
Zaida Zhou cccd20a636
[Feature] Add Registry (#11) 2022-02-16 21:45:39 +08:00
Zaida Zhou 27dd617532
[Docs] Add registry tutorial (#3)
* [Docs] Configure the documentation

* fix the format

* introduce the usage of default_scope

* add Chinese documentation

* move docs configure to another pr

* clean pr

* refactor registry docs

* fix typo

* fix typo

* reorg

* add more examples

* reslove comments

* reslove comments

* reslove comments

Co-authored-by: ZwwWayne <wayne.zw@outlook.com>
2022-02-15 13:12:16 +08:00
Zaida Zhou e88ae3a2c5
[Docs] Add the structure of the documentation (#12)
* [Docs] Configure the documentation

* delete mypy.ini
2022-02-12 22:14:15 +08:00