Commit Graph

50 Commits (cf239a2b17a3bc107ba385bae71453482858d0e8)
 

Author SHA1 Message Date
Yuan Liu cf239a2b17
[Feature]: Add checkpoint hook (#66)
* [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
2022-03-02 22:01:58 +08:00
Yifei Yang 2448380339
use unittest mock (#71) 2022-03-02 21:53:40 +08:00
Yifei Yang 94ab45d07e
[Feature] Add empty cache hook (#58)
* [Feature]: Add Part3 of Hooks

* [Feature]: Add Hook

* [Fix]: Add docstring and type hint for base hook

* [Fix]: Add test case to not the last iter, inner_iter, epoch

* [Fix]: Add missing type hint

* [Feature]: Add Args and Returns in docstring

* [Fix]: Add missing colon

* [Fix]: Add optional to docstring

* [Fix]: Fix docstring problem

* [Fix]: Fix lint

* fix lint

* update typing and docs

* fix lint

* Update mmengine/hooks/empty_cache_hook.py

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

* Update mmengine/hooks/empty_cache_hook.py

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

* Update mmengine/hooks/empty_cache_hook.py

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

* Update tests/test_hook/test_empty_cache_hook.py

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

* fix lint

* fix comments

* remove test condition

Co-authored-by: seuyou <3463423099@qq.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-03-02 14:04:41 +08:00
Yuan Liu 63a3af4f8c
[Feature]: Add optimizer hook (#70)
* [Feature]: Add optimizer hook

* [Fix]: Update docstring

* [Fix]: Add call with in UT
2022-03-01 17:42:15 +08:00
RangiLyu ee95ce2488
[Doc] Add runner tutorial. (#55)
* [Doc] Add runner tutorial.

* update

* add advanced doc

* refine and add flow chart

* update

* update
2022-03-01 15:58:34 +08:00
Yuan Liu ab31e1936e
[Feature]: Add param scheduler hook (#63)
* [Feature]: Add param scheduler hook

* [Fix]: update docstring and add assert_call to UT
2022-03-01 15:49:44 +08:00
Yuan Liu 2d3e91248c
[Feature]: Add sampler seed hook (#64)
* [Feature]: Add sampler seed hook

* [Fix]: Add call with to UT
2022-03-01 15:38:01 +08:00
Yifei Yang 1244e486ae
[Feature] Add Iter Timer Hook (#48)
* [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>
2022-03-01 12:02:34 +08:00
Yining Li 42448425b3
[Feature] Add evaluator unittest (#46)
* add evaluator unittest

* update composed evaluator cfg

* add building function

* resolve comments

* resolve comments

* resolve comments

* fix evaluator doc
2022-03-01 12:00:19 +08:00
Zaida Zhou 7313173405
[Docs] Add hooks tutorial (#38)
* [Docs] Add hooks tutorial

* improve the description about hooks

* Add OptimizerHook usages

* fix comments

* fix comments

* fix comments

* fix comments

* fix typo

* refine description

* refactor

* refactor

* add a sentence to improve docs

* briefly introduce the hook of pytorch

* refactor the order of sections

* improve the description about hooks

* improve

* fix comments

* update priorities

* improve description

* refactor title

* fix typo

* reorder priority of hook

* fix typo

* fix comments

* remove the distributed argument from SyncBuffersHook
2022-03-01 11:57:29 +08:00
Mashiro 84b8106aae
[Docs] Add logging doc (#39)
* first commit

* add logging doc

* add logging doc

* Fix lint

* Fix typo

* add logging

* update docs

* update logging.md

* update logging.md

* scale img

* update logging docs

* Fix as comment

* Fix as comment

* Fix as comment

* Fix as comment

Fix as comment

* add introduction to current=True

* Fix as comment

Fix as comment

* Fix as comment

* Fix as comment
2022-03-01 11:54:43 +08:00
RangiLyu c2c5664fad
Fix pt1.5 unit tests. (#65)
* Fix pt1.5 unit tests.

* move to mmengine.testing
2022-03-01 11:28:21 +08:00
Ma Zerun 1e5056ea7a
Stop using generic `Sampler` since it's not supported in early version (#56)
PyTorch.
2022-02-27 20:35:41 +08:00
Haian Huang(深度眸) 5170676a2f
fix mmdp unittest (#60) 2022-02-27 20:34:52 +08:00
Yuan Liu bc759e5550
[Feature]: Add base Hook (#47)
* [Feature]: Add Part3 of Hooks

* [Feature]: Add Hook

* [Fix]: Add docstring and type hint for base hook

* [Fix]: Add test case to not the last iter, inner_iter, epoch

* [Fix]: Add missing type hint

* [Feature]: Add Args and Returns in docstring

* [Fix]: Add missing colon

* [Fix]: Add optional to docstring

* [Fix]: Fix docstring problem

* [Fix]:typo

* [Fix]: Fix lint

Co-authored-by: Your <you@example.com>
2022-02-26 14:51:09 +08:00
Haian Huang(深度眸) 492b2f2fa8
[Feature] Add MMDataParallel and MMDistributedDataParallel (#44)
* add mmddp

* update

* update code

* update unittest

* fix comment
2022-02-26 10:21:20 +08:00
Wenwei Zhang 95172781f2
Add user doc of distributed primitives (#45)
* add user doc of distributed primitives

* resolve comments

* update
2022-02-25 15:38:43 +08:00
Zaida Zhou 1e79b97444
Mock unimplemented modules and fix unit tests (#54)
* Mock unimplemented modules and fix unit tests

* add a comment
2022-02-25 15:24:27 +08:00
Yining Li 92de63eed7
[Docs] Add evaluator docs (#33)
* add evaluator docs

* resolve comments

* resolve comments
2022-02-25 14:43:16 +08:00
RangiLyu d0bcb83e41
[Feature]: Add evaluator base class. (#41)
* [Feature]: Add evaluator base class.

* solve comments

* update

* fix
2022-02-24 23:41:42 +08:00
liukuikun 9437ebea67
[Feat]: Add abstract data structure (#29)
* [WIP] abstract-data-structure

* update docs

* update

* update BaseDataSample

* fix comment and coverage 100%

* update and add _set_field

* update

* split  into base_data_element and base_data_sample

* update

* update

* update

* fix typo
2022-02-22 21:45:32 +08:00
Mashiro e1f11fa595
[FIx] Fix basedataset doc (#40)
* Fix BaseDataset docs

* Fix basedataset doc
2022-02-22 21:44:16 +08:00
Mashiro ada6660c65
[Feature] add base dataset (#32)
* basedataset first commit

* add base dataset

* add dataset

* add basedataset

* Fix test dataset

* Fix mypy and test

* Fix mypy and test

* remove unused code

* Update mmengine/dataset/base_dataset.py

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

* Update mmengine/dataset/base_dataset.py

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

* add more corner cases in unittest

* fix lint

* Fix as comment

* Fix lint

* update unitest

* Type hint Dick to dict

* rename max_refetch

* Fix as comment

* Fix typo

* Fix as comment

* BaseDataset is no more an abstrac Class, change UT and docs

* Fix as comment

* Fix as comment and refactor type error

* Add comment for full init

* Fix as comment and modify dataset_wrapper

* Fix as comment and modify dataset_wrapper

* Fix as comment

* Fix as comment

* Fix as comment

* Fix as comment

* Fix as comment

* Fix as comment

* Fix as comment

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Tao Gong <gongtao950513@gmail.com>
2022-02-22 14:01:06 +08:00
Haian Huang(深度眸) adb2aee8c2
[Unittest] Add visualizer unittest (#27)
* add visualizer unittest

* update

* fix comment

* fix commit

* fix comment

* fix comment
2022-02-21 20:55:11 +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
RangiLyu 7353778b7c
[Feature]: Add optimzier and constructor. (#25)
* [Feature]: Add optimzier and constructor.

* refactor unit tests

* add optimizer doc

* add parrots wrapper

* add parrots wrapper

* solve comments

* resolve comments
2022-02-19 14:09:37 +08:00
Zaida Zhou dd6fb223e6
Fix setup.py and add requirements.txt (#37) 2022-02-19 13:43:36 +08:00
Zaida Zhou 368b4bd50a
Add runtime.txt and tests.txt (#36) 2022-02-19 12:55:56 +08:00
Mashiro b8e7c8ee8f
Fix test_auto_argparse when pytest has multiple arguments (#34) 2022-02-19 12:22:15 +08:00
Haian Huang(深度眸) e908959c31
[Docs] add visualizer docs (#16)
* add visualizer

* update

* update

* update

* update

* update

* fix lint

* fix commit

* fix commit

* fix commit

* fix commit

* refine

* refine

* update

* update

* update

* update

* update
2022-02-17 22:33:52 +08:00
Yifei Yang 6bd813c8ba
[Feature] Add Config (#24)
* add config test

* Fix typo

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

* Update tests/config/test_config.py

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

* Reconstruct config test

* Fix import logic and error test

* Fix path error

* Restructuring Config

* simplify test logic

simplify test logic

* add config

* [Feature] Add Config

* fix lint

* remove test_config

* cancel change to pre-commit yaml

* solve conflict

* fix comments

* merge main

* fix lint

* update

* remove some magic docs

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* add deprecation test

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* Update mmengine/config/config.py

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

* update

* fix mypy

* fix lint

* fix super

* improve ut coverage

* add test dump

Co-authored-by: HAOCHENYE <21724054@zju.edu.cn>
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-02-17 22:33:21 +08:00
Zaida Zhou e2df3ed9fe
Ignore the docstring of magic methods (#28) 2022-02-17 21:00:35 +08:00
Mashiro 8751231103
add config test (#10)
* add config test

* Fix typo

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

* Update tests/config/test_config.py

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

* Reconstruct config test

* Fix import logic and error test

* Fix path error

* Restructuring Config

* simplify test logic

simplify test logic

* rename test_config file

* add test complex dump and pretty text

* adjust test sequence according to comment

adjust test sequence according to comment

* add comment and test for simple.config.py

* add config test data

* add init

* remove __pycache__

* fix as comment

* add syntax test case

* remove tmp path and modify comment

* add test for setattr

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-02-17 17:46:06 +08:00
RangiLyu 7905f039b6
[Feature]: Add parameter schedulers. (#22)
* [Feature]: Add parameter schedulers.

* update

* update

* update

* update

* add docstring to lr and momentum

* resolve comments
2022-02-16 23:43:59 +08:00
Wenwei Zhang 41e1191cbc
add unit tests of data abstract interface (#21)
* add unit tests of data abstract interface

* update

* update

* update docs of data element

* a draft of UT of datasample, to be finished

* update datasample test

* updata

* update

* fix comments

* fix comments

* fix comments

Co-authored-by: liukuikun <liukuikun@sensetime.com>
2022-02-16 23:19:18 +08:00
RangiLyu bbb7d625e6
add scheduler unit test (#13)
* tmp

* add scheduler unit test

* disable yapf

* add more test

* add more test

* not use torch test case

* solve comments

* update file

* add more unit tests

* resolve comments

* update cosine ut

* fix typo

* solve comments

* solve comments

* resolve comments
2022-02-16 22:33:46 +08:00
Zaida Zhou cccd20a636
[Feature] Add Registry (#11) 2022-02-16 21:45:39 +08:00
Zaida Zhou 166ca02363
[Refactor] Move fileio directory from utils (#23)
* move fileio directory from utils

* remove CephBackend from fileio and clear some deprecated docstring

* fix format

* fix a spellling error
2022-02-15 23:43:20 +08:00
Zaida Zhou 3b5e4606b6
[Fix] Fix the type hint of fileio module (#20) 2022-02-15 20:39:43 +08:00
Tao Gong 100ede73e6
Add unittest for BaseDataset (#15)
* tmp commit

* add unittest for basedataset

* fix lint

* resolve all comments

* update

* update

* update

* update

* update

* update

* update

* resolve comments

* resolve comments

* update

* resolve comments

* resolve comments
2022-02-15 20:17:47 +08:00
Zaida Zhou 6ba7ac3a8e
Add the unittest of registry (#5)
* Add the unittest of registry

* improve the format

* fix the test_repr

* refactor the test_init

* add the copyright for tests directory

* add more unit tests

* fix error

* add unit tests for _search_child and _get_root_registry

* build_from_cfg supports dict, ConfictDict and Config

* improve docstring
2022-02-15 15:37:53 +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
Tao Gong 9b6dd78e2f
[Docs] Add docs for BaseDataset (#7)
* add docs for BaseDataset

* update docs

* update docs

* update basedataset.md

* resolve all comments

* update

* update

* refine base dataset doc

* resolve all comments

* update

* update

* update

* update

* update

* update

* update

Co-authored-by: MeowZheng <meowzheng@outlook.com>
2022-02-14 23:27:43 +08:00
Mashiro 8e9de77da4
[feature] tmp add fileio (#17)
* tmp add fileio

* ignore fileio mypy check error
2022-02-14 21:55:35 +08:00
Wenwei Zhang 019c2f5cc9
Add user documentation for abstract data interfaces (#9)
* update isort

* update

* update comments

* update

* update

* update

* fix bug in use cases

* resolve all comments

* add description of basedatasample

* rename meta_info to metainfo as meta is an adj.

* update

* resolve comments

* clean set data

* finished doc

* rephrase

* update

* resolve comments

* more clear organization

* rephrase

* rephrase

* replace 基础数据元素 by 数据元素

* rephrase
2022-02-14 16:24:18 +08:00
RangiLyu 53fe85cc81
[Doc] Add scheduler user doc. (#2)
* [Doc] Add scheduler user doc.

* reslove comments

* add chinese doc

* add update en doc

* resolve comments

* resolve comments

* update parameter scheduler

* resolve comments

* tmp remove en doc

* resolve comments

* resolve comments

* resolve comments

Co-authored-by: Kai Chen <chenkaidev@gmail.com>
2022-02-14 16:17:35 +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
Mashiro 3f3dd5b0bd
[Docs] add config docs (#6)
* add config user doc

* add config user doc

* Fix typo

* fix typo

* reference mmcv

* fix typo

* fix typo

* Restructuring config.md

* Update introduction

Co-authored-by: Kai Chen <chenkaidev@gmail.com>

* Fix

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

* Update docs/zh_cn/tutorials/config.md

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

* Fix title level

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

* refactor the doc

* remove **bold** on titles

* Fix python comment

* Fix python comment

* Update docs/zh_cn/tutorials/config.md

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

Co-authored-by: Kai Chen <chenkaidev@gmail.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-02-12 21:35:05 +08:00
Wenwei Zhang e6652850c5
update isort version (#1) 2022-02-09 20:05:26 +08:00
ZwwWayne 867bac5172 init commit to setup 2022-02-08 17:37:03 +08:00