Commit Graph

15 Commits (4c01b026f0afa5a91a5f54aea313788da1e40f95)

Author SHA1 Message Date
Zaida Zhou b6a7fd98e4
Upgrade pre commit hooks (#2321)
* Upgrade the versions of pre-commit hooks

* update the versions of zh-cn.yaml
2022-10-08 11:48:44 +08:00
Zaida Zhou 45fa3e44a2
Add pyupgrade pre-commit hook (#1937)
* add pyupgrade

* add options for pyupgrade

* minor refinement
2022-05-18 11:47:14 +08:00
Zaida Zhou 6e9ce18323
Add copyright pre-commit-hook (#1742)
* first commit

* Add copyright pre-commit-hook
2022-02-24 09:24:25 +08:00
Zaida Zhou dd82ab1497
Upgrade the version of isort (#1705)
* Upgrade the version of isort

* sort the order of importing modules
2022-02-09 21:29:21 +08:00
Jiazhen Wang 250fadc210
[Fix] Fix checkpoint local files detect (#1549)
* [fix] fix checkpoint local files detect

* [Fix] add support for path like '~/xx/file'

* [Fix] fix some details

* [Fix] fix unittest
2021-12-14 13:17:29 +08:00
Zaida Zhou 84c7dc3436
[Fix] Fix the path of ceph containing cluster name (#1577)
* [Fix] Fix the path of ceph containing cluster name

* fix corner cases

* fix format

* add note
2021-12-14 10:41:27 +08:00
Zaida Zhou 32e09f4933
[Feature] Upload checkpoints and logs to ceph (#1375)
* [Feature] Choose storage backend by the prefix of filepath

* refactor FileClient and add unittest

* support loading from different backends

* polish docstring

* fix unittet

* rename attribute str_like_obj to is_str_like_obj

* [Docs] Upload checkpoint to petrel oss

* add infer_client method

* Support uploading checkpoint to petrel oss

* add check_exist method

* refactor CheckpointHook

* support uploading logs to ceph

* rename var client to file_client

* polish docstring

* enhance load_from_ceph

* refactor load_from_ceph

* refactor TextLoggerHook

* change the meaning of out_dir argument

* fix test_checkpoint_hook.py

* add join_paths method

* remove join_paths and add _format_path

* enhance unittest

* refactor unittest

* add a unittest for EvalHook when file backend is petrel

* singleton pattern

* fix test_clientio.py

* deprecate CephBackend

* add warning in load_from_ceph

* fix type of out_suffix

* enhance docstring

* refactor unittest for petrel

* refactor unittest for disk backend

* update io.md

* add concat_paths method

* fix CI

* mock check_exist

* improve docstring

* improve docstring

* improve docstring

* improve docstring

* add isdir and copyfile for file backend

* delete copyfile and add get_local_path

* remove isdir method of petrel

* fix typo

* rename check_exists to exists

* refactor code and polish docstring

* fix windows ci

* add comment and polish docstring

* polish docstring

* polish docstring

* rename _path_mapping to _map_path

* polish docstring and fix typo

* refactor get_local_path

* add list_dir_or_file for FileClient

* add list_dir_or_file for PetrelBackend

* fix windows ci

* Add return docstring

* polish docstring

* fix typo

* fix typo

* fix typo

* fix error when mocking PetrelBackend

* deprecate the conversion from Path to str

* add docs for loading checkpoints with FileClient

* rename keep_log to keep_local

* refactor map_path

* add _ensure_methods to ensure methods have been implemented

* fix list_dir_or_file

* rename _ensure_method_implemented to has_method

* refactor

* polish information

* format information
2021-10-24 14:26:52 +08:00
Ma Zerun f5c28a6e08
[Fix] Fix missing `state_dict._metadata` when saving and loading checkpoints. (#1294)
* Fix missing `state_dict._metadata` when saving & loading checkpoints.

* Add unit tests.

* Fix default value and variable names in unit tests.
2021-09-07 17:53:33 +08:00
Ycr e076c8b042
[Feature] Support revise_keys in load_checkpoint(). (#829)
* Simplified the code.

* Improved chkpt compatibility.

* One may modify the checkpoint via adding keywords.

* Tiny.

* Following reviewer's suggestion.

* Added unit_test.

* Fixed.

* Modify the state_dict  with  construction.

* Added test.

* Modified。

* Mimimalised the modification.

* Added the docstring.

* Format.

* Improved.

* Tiny.

* Temp file.

* Added assertion.

* Doc string.

* Fixed.
2021-03-03 10:59:11 +08:00
Miao Zheng a4c3702628
add initializers and BaseModule for unified parameter initialization (#780)
* add initializers and BaseModule for unified parameter initialization

* fix circle import

* bug fix

* add is_init flag in BaseModule

* fix docstring

* sort import and fix doc format

* fix bug

* fix docformat and double quote string

* fix import sort

* import sort

* sort import

* revise according to comments

* fix doc format

* revise according to comments

* revise import and fix typo

* polish code

* revise minors

* revice minors

* revise apply function

* revise bias initialization with probability

* add type test for bias_prob

* revise minors
2021-02-07 11:13:57 +08:00
Haian Huang(深度眸) 96892bdc42
Refactor _load_checkpoint fn (#790)
* Refactor _load_checkpoint fn

* Update _load_checkpoint fn

* Update docs str and add unit test

* Fix unit test

* Fix lint

* Add comment and Optimize function

* Fix docs str

* Update load_ckpt and fix doc str

* Update doc str and add sort unit test

* Update and fix unit test

* Fix unit test

* Update and add unit test

* Fix openmmlab prefix error
2021-01-28 15:09:19 +08:00
BigBigDream 8e3a801596
fix mmcv ci for parrots (#782)
* fix mmcv ci for parrots

* fix mmcv ci

* fix lint
2021-01-14 14:31:57 +08:00
Qiaofei Li 3d6032c6db
Add dataset classes name info to meta for saving ckpt (#776)
* add CLASSES to meta info

* Update checkpoint.py

* add unit test for CLASSES name

* clean up the tmp folder

* use tempfile to clean up temp folder
2021-01-08 16:40:43 +08:00
LXXXXR 09661d9754
[Feature] support upload and download checkpoint from pavimodelcloud (#725)
* support upload and download checkpoint from pavimodelcloud

* try import pavi

* add unittest
2020-12-22 12:59:07 +08:00
Harry 5704613e28
Remove all module wrapper's module when saving checkpoint (#399)
* fix: remove all module wrapper when saving checkpoint

* refactor: move position of if

* docs: add docstring

* refactor: add _save_to_state_dict from official torch

* docs: modify docstring of _save_to_state_dict

* docs: modify docstring

* feat: add unittest

* feat: add DataParallel to unittest

* fix: a bug when model has batchnorm

* docs: update docstring
2020-07-08 23:20:22 +08:00