* add windows CI
* clean versions
* only allow pt1.7 on windows
* fix windows install issue
* add win cpu
* fix win command
* clean unnecessary command
* resolve turbojpeg & tempfile on win
* replace os.readlink with os.path.realpath
* fix windows ci
* close file before removing it
* fix windows ci
* fix symlink on windows
* fix windows ci
* fix windows ci
* fix windows ci
* fix windows ci
* fix windows ci
* fix windows ci
* fix windows ci
* fix windows ci
* fix windows ci
* modify according to comment
Co-authored-by: zhouzaida <zhouzaida@163.com>
* Add gradient cumulative optimizer
fixes#190
* Update optimizer.py
* Update optimizer.py
* fix loss scale improperly in last equivalent_iter
* Add `GradientCumulativeOptimizerHook` in `__init__.py`.
* Add docstring of `GradientCumulativeOptimizerHook`.
* Add type check, BN warning and resume warning. And fix typo, lint the
code.
* Add unit test
* Update docstring example.
* Change GradientCumulativeOptimizerHook `__init__` arguments.
* Add GradientCumulativeOptimzierHook unit tests with IterBasedRunner.
* Add GradientCumulativeFp16OptimizerHook.
* Add unit tests of GradientCumulativeFp16OptimizerHook
* Use '!=' instead of '>' to determine resume
Co-authored-by: Zhiyuan Chen <this@zyc.ai>
* add flat cosine lr updater
* add test
* add doc
* update doc
* reformat
* update unittest
* update test flat cos
* remove momentum hook test
* update test
* change assert to ValueError
* fix unittest
* add by_epoch=True unittest
* change to start_percent
* change to start_percent in test
* support print using hooks before running.
* Support to print hook trigger stages.
* Print stage-wise hook infos. And make `stages` as class attribute of
`Hook`
* Add util function `is_method_overriden` and use it in
`Hook.get_trigger_stages`.
* Add unit tests.
* Move `is_method_overriden` to `mmcv/utils/misc.py`
* Improve hook info text.
* Add base_class argument type assertion, and fix some typos.
* Remove `get_trigger_stages` to `get_triggered_stages`
* Use f-string.
* Refine default hooks and custom hooks priority rank.
* Add unit tests for custom hooks with string priority.
* Use priority `ABOVE_NORMAL` and `BELOW_NORMAL` instead of `HIGHER` and
`LOWER`.
And add unit tests for custom hook with the same priority as
default hooks.
* Assign different priority to default hooks, and add custom hook register in base runner.
* Add custom hook register in example train file
* Add unittest of custom hook
* Code format
* support clipping min_lr in StepLrUpdaterHook
* add docstring for StepLrUpdaterHook
* fix small bugs
* add unit test for StepLrUpdaterHook
* fix linting error
* [Fix] OneCycleLrUpdaterHook interface
* revise according to comments
* revise according to comments
* add test
* fix lint
* revise according to comments
* minors
* add pytest param
* fix lint
* ci
* Update lr_updater.py
since epoch/iteration in runner starts with 0, we shouldn't leave the latter iteration to former (12th epoch for example, with first period equal to 12) period.
* Update lr_updater.py
* Update test_hooks.py
* Add build_runner
* Parametrize test_runner
* Add imports to runner __init__
* Refactor max_iters and max_epochs from run to init
* Add assertion error messages
* Add test_builder
* Make change retro-compatible
* Raise ValueError if max_epochs and max_iters
* add ema hook
* add ema hook resume
* add ema hook test
* fix typo
* fix according to comment
* delete logger
* fix according to comment
* fix unitest
* fix typo
* fix according to comment
* change to resume_from
* typo
* fix isort
* feat: add CosineRestartLrUpdaterHook
* style: rename period to periods
* fix: bug in period 0
* feat: rename eta_min to min_lr and add min_lr_ratio
* docs: fix docstring of restart lr updater
* refactor: use annealing_cos
* docs: add docstring to annealing_cos
* feat: cosine restart lr update hook
* refactor: modify code order for unittest
* add a BaseRunner and rename Runner to EpochBasedRunner
* fix the train/val step
* bug fix
* update unit tests
* fix unit tests
* raise an error if both batch_processor and train_step are set
* add a unit test