Skip to content
Snippets Groups Projects
Unverified Commit 26e54624 authored by Zaida Zhou's avatar Zaida Zhou Committed by GitHub
Browse files

[Dev]: Upgrade pre commit hooks (#576)

* Upgrade the versions of pre-commit-hooks

* update zh-cn.yaml
parent 36af1f0f
No related branches found
No related tags found
No related merge requests found
exclude: ^tests/data/
repos:
- repo: https://gitee.com/openmmlab/mirrors-flake8
rev: 3.8.3
rev: 5.0.4
hooks:
- id: flake8
- repo: https://gitee.com/openmmlab/mirrors-isort
......@@ -9,11 +9,11 @@ repos:
hooks:
- id: isort
- repo: https://gitee.com/openmmlab/mirrors-yapf
rev: v0.30.0
rev: v0.32.0
hooks:
- id: yapf
- repo: https://gitee.com/openmmlab/mirrors-pre-commit-hooks
rev: v3.1.0
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: check-yaml
......@@ -35,7 +35,7 @@ repos:
- mdformat_frontmatter
- linkify-it-py
- repo: https://gitee.com/openmmlab/mirrors-codespell
rev: v2.1.0
rev: v2.2.1
hooks:
- id: codespell
- repo: https://gitee.com/openmmlab/mirrors-docformatter
......@@ -44,7 +44,7 @@ repos:
- id: docformatter
args: ["--in-place", "--wrap-descriptions", "79"]
- repo: https://github.com/asottile/pyupgrade
rev: v2.32.1
rev: v3.0.0
hooks:
- id: pyupgrade
args: ["--py36-plus"]
......
exclude: ^tests/data/
repos:
- repo: https://github.com/PyCQA/flake8
rev: 3.8.3
rev: 5.0.4
hooks:
- id: flake8
- repo: https://github.com/PyCQA/isort
......@@ -9,11 +9,11 @@ repos:
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.30.0
rev: v0.32.0
hooks:
- id: yapf
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: check-yaml
......@@ -35,7 +35,7 @@ repos:
- mdformat_frontmatter
- linkify-it-py
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
rev: v2.2.1
hooks:
- id: codespell
- repo: https://github.com/myint/docformatter
......@@ -44,7 +44,7 @@ repos:
- id: docformatter
args: ["--in-place", "--wrap-descriptions", "79"]
- repo: https://github.com/asottile/pyupgrade
rev: v2.32.1
rev: v3.0.0
hooks:
- id: pyupgrade
args: ["--py36-plus"]
......
......@@ -199,7 +199,7 @@ class Config:
# `temp_file` is opened first in `tempfile.NamedTemporaryFile` and
# second in `Config.from_file`.
# In addition, a named temporary file will be removed after closed.
# As a workround we set `delete=False` and close the temporary file
# As a workaround we set `delete=False` and close the temporary file
# before opening again.
with tempfile.NamedTemporaryFile(
......
......@@ -109,7 +109,7 @@ class MMLogger(Logger, ManagerMixin):
``MMLogger.get_instance`` but not ``logging.getLogger``. This feature
ensures ``MMLogger`` will not be incluenced by third-party logging
config.
- Different from ``logging.Logger``, ``MMLogger`` will not log warrning
- Different from ``logging.Logger``, ``MMLogger`` will not log warning
or error message without ``Handler``.
Examples:
......
......@@ -563,9 +563,9 @@ class ExponentialParamScheduler(_ParamScheduler):
@PARAM_SCHEDULERS.register_module()
class CosineAnnealingParamScheduler(_ParamScheduler):
r"""Set the parameter value of each parameter group using a cosine annealing
schedule, where :math:`\eta_{max}` is set to the initial value and
:math:`T_{cur}` is the number of epochs since the last restart in SGDR:
r"""Set the parameter value of each parameter group using a cosine
annealing schedule, where :math:`\eta_{max}` is set to the initial value
and :math:`T_{cur}` is the number of epochs since the last restart in SGDR:
.. math::
\begin{aligned}
......
......@@ -129,7 +129,8 @@ class LogProcessor:
for key, value in tag.items():
if key.endswith('lr'):
log_tag.pop(key)
lr_str_list.append(f'{key}: ' f'{value:.{self.num_digits}e}')
lr_str_list.append(f'{key}: '
f'{value:.{self.num_digits}e}')
lr_str = ' '.join(lr_str_list)
# Format log header.
# by_epoch == True
......
......@@ -13,4 +13,4 @@ BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF = true
SPLIT_BEFORE_EXPRESSION_AFTER_OPENING_PAREN = true
[codespell]
ignore-words-list = nd, ba
ignore-words-list = nd, ba, warmup
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment