-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Support LR_ReduceOnPlateau #1033
Conversation
liguankai seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
… set (open-mmlab#1015) * +super().before_run() * flip reset_flag
Codecov Report
@@ Coverage Diff @@
## master #1033 +/- ##
==========================================
+ Coverage 65.30% 67.78% +2.48%
==========================================
Files 154 159 +5
Lines 9891 10558 +667
Branches 1801 1935 +134
==========================================
+ Hits 6459 7157 +698
+ Misses 3099 3025 -74
- Partials 333 376 +43
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
* fix generalized attention fp16 * fix building without gpu error * add comment * Cast tensor at initialization
* add neptune.ai logger hook * add docstring * move docstring * update docstr * update before_run
… on DCN/DCNv2 amp (open-mmlab#1029) * fix fp16 bug on DCNv2 * support fp16 on DCN/DCNv2 when pytorch >= '1.6.0' * add comment * Modified the comments * Unified the usages of '.to()' and '.type_as()'
* [Feature] Add truncated normal weight init * [Feature] Add truncated normal weight init * [Feature] Add truncated normal weight init * update docstring * delete modelA.pth * modify according to comment * use kstest to check truncated normal * delete modelA.pth * fix test.txt
* add cummax/cummin tensorrt plugin * fix isort * fix with clang-format * fix with clang-format again * add document
* Fix typos Signed-off-by: lizz <[email protected]> * Add deprecation warning Signed-off-by: lizz <[email protected]>
* support cuda version `BorderAlign` module * fix symbolic * merge * fix cpp lint error * add unit test * add comments for code references * reformat doc * fix lint error * fix conflict
* add instancenorm plugin * resolve comments * fix lint * fix typo
mmcv/runner/hooks/lr_updater.py
Outdated
eps=1e-8, | ||
**kwargs): | ||
if isinstance(periods, list): | ||
assert mmcv.is_list_of(periods, int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should add arguments like assert expression [, arguments]
mmcv/runner/hooks/lr_updater.py
Outdated
class ReduceLrUpdateHook(LrUpdaterHook): | ||
|
||
def __init__(self, | ||
periods, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add type hint for arguments
raise TypeError('"periods" must be a list') | ||
self.periods = periods | ||
self.val_metric = val_metric | ||
if mode not in ['min', 'max']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is readable to add a blank line between different logical code
mmcv/runner/hooks/lr_updater.py
Outdated
elif self.mode == 'max' and self.threshold_mode == 'rel': | ||
rel_epsilon = 1. + self.threshold | ||
return a > best * rel_epsilon | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the blank line
open-mmlab#1076) * EvalHook uses case-insensitive key indicator matching and configurable test functions * * fix docstring * * move test_fn import into __init__ * configurable greater/less keys * * update unittest * update DistEvalHook * fix comments and remove debug code * support single greater/less key
* Fix the permission denied error on windows. * Format code. * Using a cleaner way. * Update config.py use os.unlink instead of unlink * change unlink to remove * add notes for new implementation * Fix typo Co-authored-by: WRH <[email protected]> Co-authored-by: Wenwei Zhang <[email protected]>
* Support variables in base files for configs Signed-off-by: lizz <[email protected]> * Test json and yaml as well Signed-off-by: lizz <[email protected]> * Add test for recusive base Signed-off-by: lizz <[email protected]> * Test misleading values Signed-off-by: lizz <[email protected]> * Improve comments Signed-off-by: lizz <[email protected]> * Add doc Signed-off-by: lizz <[email protected]> * Improve doc Signed-off-by: lizz <[email protected]> * More tests Signed-off-by: lizz <[email protected]> * Harder test case Signed-off-by: lizz <[email protected]> * use BASE_KEY instead of base Signed-off-by: lizz <[email protected]>
* 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.
…tention (open-mmlab#1143) * optimize criss cross attention * optimize criss cross attention * optimize criss cross attention * fix lint * fix ci, remove useless variable * better ca_forward_kernel Co-authored-by: wondervictor <[email protected]>
…b#1091) * Support image reading while ignoring EXIF orientation info Add unit test for ignore_orientation flags in imread() * add documentation for imread * Add test cases
* 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.
* [Fix] Fix SyncBN build in PyTorch 1.9 * fixed parrots SyncBN
* Missing check for dir in the 'else' clause Fixing issue when recursively scanning directories with filenames starting with '.' Without this fix, the `if not entry.name.startswith('.') and entry.is_file()` logic falls through to the `else` clause which in the current code base will error out as it encounters '.' files (e.g. .DS_Store) * Updated code per comments * fixing indentation * fix indenterror and add comment * remove .DS_Store and add .file Co-authored-by: zhouzaida <[email protected]>
* Change dict update order * Change dict() with {} * Added comments with PR link * Fixed comments according to Lint Job
* fix saconv * update * update * fix * use LooseVersion
* [Docs] Refactor documentation * [Docs] Refactor documentation * refactor docs * refactor docs * set sphinx==3.1.2 * fix typo * modify according to comment * modify according to comment * modify according to comment * [Docs] delete unnecessary file * fix title * rename * rename
* fix test.txt * fix unittest in pt1.9 * fix checkpoint filename error * add comment * fix unittest * fix onnxruntime version
* add ci for pt1.8 pt1.9 * remove cp command * change cuda verison * fix typo * fix ci * fix typo
* [Docs] Fix sphinx version * [Docs] Remove sphinx_markdown_tables * update readme link * add sphinx_rtd_theme package
* Remove _build directroy in docs_zh_CN * Change utils title to Chinese * Translate documents * Translate documents * Use symbolic link to avoid repeated images * Use symbolic link to avoid repeated images * fix readme.md * update copyright * refactor docs * rename title to Chinese
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
Motivation
Please describe the motivation of this PR and the goal you want to achieve through this PR.
Modification
Please briefly describe what modification is made in this PR.
BC-breaking (Optional)
Does the modification introduce changes that break the back-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.
Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.
Checklist