diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6b44b72bfe..bc3ce18a45 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://gitlab.com/pycqa/flake8.git - 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 @@ -34,7 +34,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 @@ -53,7 +53,7 @@ repos: files: ^configs/.*\.md$ require_serial: true - repo: https://github.com/asottile/pyupgrade - rev: v2.32.1 + rev: v3.0.0 hooks: - id: pyupgrade args: ["--py36-plus"] diff --git a/docs/en/get_started.md b/docs/en/get_started.md index d81aea2395..d7baac2c43 100644 --- a/docs/en/get_started.md +++ b/docs/en/get_started.md @@ -43,7 +43,7 @@ We recommend that users follow our best practices to install MMSegmentation. How ```shell pip install -U openmim mim install 'mmcv>=2.0.0rc1' -mim install mmmenigne +mim install mmenigne ``` **Step 1.** Install MMSegmentation. diff --git a/docs/en/user_guides/visualization.md b/docs/en/user_guides/visualization.md index c0a9c86e8a..e7c3359cc9 100644 --- a/docs/en/user_guides/visualization.md +++ b/docs/en/user_guides/visualization.md @@ -95,7 +95,7 @@ wget https://user-images.githubusercontent.com/24582831/189833109-eddad58f-f777- wget https://user-images.githubusercontent.com/24582831/189833143-15f60f8a-4d1e-4cbb-a6e7-5e2233869fac.png --output-document aachen_000000_000019_gtFine_labelTrainIds.png ``` -Then you can find their local path and use the scrips below to visualize: +Then you can find their local path and use the scripts below to visualize: ```python import mmcv diff --git a/mmseg/models/backbones/vit.py b/mmseg/models/backbones/vit.py index 05948abe7c..3c96f65493 100644 --- a/mmseg/models/backbones/vit.py +++ b/mmseg/models/backbones/vit.py @@ -335,7 +335,7 @@ def init_weights(self): constant_init(m, val=1.0, bias=0.) def _pos_embeding(self, patched_img, hw_shape, pos_embed): - """Positiong embeding method. + """Positioning embeding method. Resize the pos_embed, if the input image size doesn't match the training size. diff --git a/mmseg/models/losses/focal_loss.py b/mmseg/models/losses/focal_loss.py index 299adc0545..104d6602c8 100644 --- a/mmseg/models/losses/focal_loss.py +++ b/mmseg/models/losses/focal_loss.py @@ -78,7 +78,7 @@ def sigmoid_focal_loss(pred, valid_mask=None, reduction='mean', avg_factor=None): - r"""A warpper of cuda version `Focal Loss + r"""A wrapper of cuda version `Focal Loss `_. Args: pred (torch.Tensor): The prediction with shape (N, C), C is the number diff --git a/setup.cfg b/setup.cfg index 23cb09e698..dc5ea07111 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,4 +16,4 @@ default_section = THIRDPARTY skip = *.po,*.ts,*.ipynb count = quiet-level = 3 -ignore-words-list = formating,sur,hist,dota +ignore-words-list = formating,sur,hist,dota,warmup