Skip to content

Commit

Permalink
[Enhance] Add code-spell pre-commit hook and fix a typo. (open-mmlab#…
Browse files Browse the repository at this point in the history
…6306)

* pre-commit: Add codespell to look for typos

* fixup! Indentation

* Fix a typo and add ignore_words

* Fix a typo

* Should use lowercase

Co-authored-by: Christian Clauss <[email protected]>
  • Loading branch information
AronLin and cclauss authored Oct 18, 2021
1 parent 0d02ccd commit c1302d5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ repos:
hooks:
- id: markdownlint
args: ["-r", "~MD002,~MD013,~MD024,~MD029,~MD033,~MD034,~MD036", "-t", "allow_different_nesting"]
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
- repo: https://github.com/myint/docformatter
rev: v1.3.1
hooks:
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/customize_runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Tricks not implemented by the optimizer should be implemented through optimizer
_delete_=True, grad_clip=dict(max_norm=35, norm_type=2))
```

If your config inherits the base config which already sets the `optimizer_config`, you might need `_delete_=True` to overide the unnecessary settings. See the [config documentation](https://mmdetection.readthedocs.io/en/latest/tutorials/config.html) for more details.
If your config inherits the base config which already sets the `optimizer_config`, you might need `_delete_=True` to override the unnecessary settings. See the [config documentation](https://mmdetection.readthedocs.io/en/latest/tutorials/config.html) for more details.

- __Use momentum schedule to accelerate model convergence__:
We support momentum scheduler to modify model's momentum according to learning rate, which could make the model converge in a faster way.
Expand Down
5 changes: 5 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ default_section = THIRDPARTY
BASED_ON_STYLE = pep8
BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF = true
SPLIT_BEFORE_EXPRESSION_AFTER_OPENING_PAREN = true

[codespell]
skip = *.ipynb
quiet-level = 3
ignore-words-list = patten,nd,ty,mot,hist,formating,winn,gool,datas,wan

0 comments on commit c1302d5

Please sign in to comment.