From a502d8fc6297c89ca43a18c0b614e0d7f69d90d0 Mon Sep 17 00:00:00 2001 From: wanghonglie Date: Sat, 8 Oct 2022 19:38:17 +0800 Subject: [PATCH] [CI]: Upgrade pre commit hooks in master (#8964) * Upgrade the versions of pre-commit-hooks * Upgrade setup.cfg * Upgrade setup.cfg --- .pre-commit-config.yaml | 8 ++++---- docs/en/changelog.md | 2 +- docs/en/tutorials/data_pipeline.md | 2 +- mmdet/core/bbox/samplers/sampling_result.py | 4 ++-- mmdet/models/losses/focal_loss.py | 2 +- mmdet/models/losses/mse_loss.py | 2 +- setup.cfg | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fb0883d5e69..62ba35769d9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/PyCQA/flake8 - rev: 3.8.3 + rev: 5.0.4 hooks: - id: flake8 - repo: https://github.com/PyCQA/isort @@ -8,11 +8,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 @@ -25,7 +25,7 @@ repos: - id: mixed-line-ending args: ["--fix=lf"] - repo: https://github.com/codespell-project/codespell - rev: v2.1.0 + rev: v2.2.1 hooks: - id: codespell - repo: https://github.com/executablebooks/mdformat diff --git a/docs/en/changelog.md b/docs/en/changelog.md index 04acbceeb12..06bb3beb4d8 100644 --- a/docs/en/changelog.md +++ b/docs/en/changelog.md @@ -639,7 +639,7 @@ Thanks @Boyden, @onnkeat, @st9007a, @vealocia, @yhcao6, @DapangpangX, @yellowdol - Support [PVT](https://arxiv.org/abs/2102.12122) and [PVTv2](https://arxiv.org/abs/2106.13797) (#5780) - Support [SOLO](https://arxiv.org/abs/1912.04488) (#5832) - Support large scale jittering and New Mask R-CNN baselines (#6132) -- Add a general data structrue for the results of models (#5508) +- Add a general data structure for the results of models (#5508) - Added a base class for one-stage instance segmentation (#5904) - Speed up `YOLOv3` inference (#5991) - Release Swin Transformer pre-trained models (#6100) diff --git a/docs/en/tutorials/data_pipeline.md b/docs/en/tutorials/data_pipeline.md index 919220df6f0..57a6db45db9 100644 --- a/docs/en/tutorials/data_pipeline.md +++ b/docs/en/tutorials/data_pipeline.md @@ -195,5 +195,5 @@ For each operation, we list the related dict fields that are added/updated/remov To visualize the output of your augmentation pipeline, `tools/misc/browse_dataset.py` can help the user to browse a detection dataset (both images and bounding box annotations) - visually, or save the image to a designated directory. More detials can refer to + visually, or save the image to a designated directory. More details can refer to [useful_tools](../useful_tools.md) diff --git a/mmdet/core/bbox/samplers/sampling_result.py b/mmdet/core/bbox/samplers/sampling_result.py index 50676d04191..11a02c5d95a 100644 --- a/mmdet/core/bbox/samplers/sampling_result.py +++ b/mmdet/core/bbox/samplers/sampling_result.py @@ -117,7 +117,7 @@ def random(cls, rng=None, **kwargs): from mmdet.core.bbox.samplers.random_sampler import RandomSampler rng = demodata.ensure_rng(rng) - # make probabalistic? + # make probabilistic? num = 32 pos_fraction = 0.5 neg_pos_ub = -1 @@ -141,7 +141,7 @@ def random(cls, rng=None, **kwargs): if gt_labels is None: add_gt_as_proposals = False else: - add_gt_as_proposals = True # make probabalistic? + add_gt_as_proposals = True # make probabilistic? sampler = RandomSampler( num, diff --git a/mmdet/models/losses/focal_loss.py b/mmdet/models/losses/focal_loss.py index 6c20fddd56f..2858c198101 100644 --- a/mmdet/models/losses/focal_loss.py +++ b/mmdet/models/losses/focal_loss.py @@ -117,7 +117,7 @@ def sigmoid_focal_loss(pred, alpha=0.25, reduction='mean', avg_factor=None): - r"""A warpper of cuda version `Focal Loss + r"""A wrapper of cuda version `Focal Loss `_. Args: diff --git a/mmdet/models/losses/mse_loss.py b/mmdet/models/losses/mse_loss.py index 4a622f86de8..2ebd161f007 100644 --- a/mmdet/models/losses/mse_loss.py +++ b/mmdet/models/losses/mse_loss.py @@ -8,7 +8,7 @@ @weighted_loss def mse_loss(pred, target): - """Warpper of mse loss.""" + """Wrapper of mse loss.""" return F.mse_loss(pred, target, reduction='none') diff --git a/setup.cfg b/setup.cfg index 56407a12ec5..a11a4834fcb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -18,4 +18,4 @@ 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,confids,TOOD,tood,ba +ignore-words-list = patten,nd,ty,mot,hist,formating,winn,gool,datas,wan,confids,TOOD,tood,ba,warmup,nam