From f3f15020766054ec64d9d6e82921b325b6bc9fa9 Mon Sep 17 00:00:00 2001 From: C1rN09 Date: Tue, 14 Feb 2023 14:56:47 +0800 Subject: [PATCH 1/6] temporarily skip readthedocs errors in building pdf docs --- .readthedocs.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 7d5f1c2060..c767acfb31 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,6 +1,8 @@ version: 2 -formats: all +formats: + - html + - epub python: version: 3.7 From f1a2197f3926c7085659d2c219682d68684f9a0f Mon Sep 17 00:00:00 2001 From: C1rN09 Date: Tue, 14 Feb 2023 14:57:02 +0800 Subject: [PATCH 2/6] fix error links --- docs/en/advanced_tutorials/test_time_augmentation.md | 2 +- docs/zh_cn/advanced_tutorials/test_time_augmentation.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/advanced_tutorials/test_time_augmentation.md b/docs/en/advanced_tutorials/test_time_augmentation.md index 6abbd21b95..9c42d15111 100644 --- a/docs/en/advanced_tutorials/test_time_augmentation.md +++ b/docs/en/advanced_tutorials/test_time_augmentation.md @@ -4,7 +4,7 @@ Test time augmentation (TTA) is a data augmentation strategy used during the tes The core implementation of TTA is usually divided into two parts: -1. Data augmentation: This part is implemented in MMCV, see the api docs [TestTimeAug](mmcv.transform.TestTimeAug) for more information. +1. Data augmentation: This part is implemented in MMCV, see the api docs [TestTimeAug](mmcv.transforms.TestTimeAug) for more information. 2. Merge the predictions: The subclasses of `BaseTTAModel` will merge the predictions of enhanced data in the `test_step` method to improve the accuracy of predictions. ## Get started diff --git a/docs/zh_cn/advanced_tutorials/test_time_augmentation.md b/docs/zh_cn/advanced_tutorials/test_time_augmentation.md index dab9f6b870..77b85b51a8 100644 --- a/docs/zh_cn/advanced_tutorials/test_time_augmentation.md +++ b/docs/zh_cn/advanced_tutorials/test_time_augmentation.md @@ -4,7 +4,7 @@ TTA 的核心实现通常分为两个部分: -1. 测试时的数据增强:测试时数据增强主要在 MMCV 中实现,可以参考 [TestTimeAug 的 API 文档](mmcv.transform.TestTimeAug),本文档不再赘述。 +1. 测试时的数据增强:测试时数据增强主要在 MMCV 中实现,可以参考 [TestTimeAug 的 API 文档](mmcv.transforms.TestTimeAug),本文档不再赘述。 2. 模型推理以及结果融合:`BaseTTAModel` 的主要功能就是实现这一部分,`BaseTTAModel.test_step` 会解析测试时增强后的数据并进行推理。用户继承 `BaseTTAModel` 后只需实现相应的融合策略即可。 ## 快速上手 From 3e69092ecc5ebfe118fd3d4cd3499bad4deff13d Mon Sep 17 00:00:00 2001 From: C1rN09 Date: Tue, 14 Feb 2023 15:04:44 +0800 Subject: [PATCH 3/6] remove useless links --- docs/en/notes/contributing.md | 4 ++-- docs/zh_cn/notes/contributing.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/notes/contributing.md b/docs/en/notes/contributing.md index fdf3f3bbf5..02b24e7634 100644 --- a/docs/en/notes/contributing.md +++ b/docs/en/notes/contributing.md @@ -214,11 +214,11 @@ We use the following tools for linting and formatting: - [mdformat](https://github.com/executablebooks/mdformat): Mdformat is an opinionated Markdown formatter that can be used to enforce a consistent style in Markdown files. - [docformatter](https://github.com/myint/docformatter): A formatter to format docstring. -Style configurations of yapf and isort can be found in [setup.cfg](../../../setup.cfg). +Style configurations of yapf and isort can be found in setup.cfg. We use [pre-commit hook](https://pre-commit.com/) that checks and formats for `flake8`, `yapf`, `isort`, `trailing whitespaces`, `markdown files`, fixes `end-of-files`, `double-quoted-strings`, `python-encoding-pragma`, `mixed-line-ending`, sorts `requirments.txt` automatically on every commit. -The config for a pre-commit hook is stored in [.pre-commit-config](../../../.pre-commit-config.yaml). +The config for a pre-commit hook is stored in .pre-commit-config. ## PR Specs diff --git a/docs/zh_cn/notes/contributing.md b/docs/zh_cn/notes/contributing.md index f79a5fe93c..726c2b4b26 100644 --- a/docs/zh_cn/notes/contributing.md +++ b/docs/zh_cn/notes/contributing.md @@ -224,10 +224,10 @@ make html - [mdformat](https://github.com/executablebooks/mdformat): 检查 markdown 文件的工具 - [docformatter](https://github.com/myint/docformatter): 格式化 docstring 的工具 -yapf 和 isort 的配置可以在 [setup.cfg](../../../setup.cfg) 找到 +yapf 和 isort 的配置可以在 setup.cfg 找到 通过配置 [pre-commit hook](https://pre-commit.com/) ,我们可以在提交代码时自动检查和格式化 `flake8`、`yapf`、`isort`、`trailing whitespaces`、`markdown files`,修复 `end-of-files`、`double-quoted-strings`、`python-encoding-pragma`、`mixed-line-ending`,调整 `requirments.txt` 的包顺序。 -pre-commit 钩子的配置可以在 [.pre-commit-config](../../../.pre-commit-config.yaml) 找到。 +pre-commit 钩子的配置可以在 .pre-commit-config 找到。 pre-commit 具体的安装使用方式见[拉取请求](#2-配置-pre-commit)。 From e039c2175ff7c448b7f183521a6e67a6c5a3a33f Mon Sep 17 00:00:00 2001 From: C1rN09 Date: Tue, 14 Feb 2023 15:06:40 +0800 Subject: [PATCH 4/6] fix --- .readthedocs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index c767acfb31..76e379675e 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,7 +1,6 @@ version: 2 formats: - - html - epub python: From da8543d5b024615b34381098b755d1faab3740f3 Mon Sep 17 00:00:00 2001 From: C1rN09 Date: Tue, 14 Feb 2023 16:49:50 +0800 Subject: [PATCH 5/6] fix broken links as github url --- docs/en/notes/contributing.md | 4 ++-- docs/zh_cn/notes/contributing.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/notes/contributing.md b/docs/en/notes/contributing.md index 02b24e7634..5adf7d84d0 100644 --- a/docs/en/notes/contributing.md +++ b/docs/en/notes/contributing.md @@ -214,11 +214,11 @@ We use the following tools for linting and formatting: - [mdformat](https://github.com/executablebooks/mdformat): Mdformat is an opinionated Markdown formatter that can be used to enforce a consistent style in Markdown files. - [docformatter](https://github.com/myint/docformatter): A formatter to format docstring. -Style configurations of yapf and isort can be found in setup.cfg. +Style configurations of yapf and isort can be found in [setup.cfg](https://github.com/open-mmlab/mmengine/blob/main/setup.cfg). We use [pre-commit hook](https://pre-commit.com/) that checks and formats for `flake8`, `yapf`, `isort`, `trailing whitespaces`, `markdown files`, fixes `end-of-files`, `double-quoted-strings`, `python-encoding-pragma`, `mixed-line-ending`, sorts `requirments.txt` automatically on every commit. -The config for a pre-commit hook is stored in .pre-commit-config. +The config for a pre-commit hook is stored in [.pre-commit-config](https://github.com/open-mmlab/mmengine/blob/main/.pre-commit-config.yaml). ## PR Specs diff --git a/docs/zh_cn/notes/contributing.md b/docs/zh_cn/notes/contributing.md index 726c2b4b26..78da9b2db4 100644 --- a/docs/zh_cn/notes/contributing.md +++ b/docs/zh_cn/notes/contributing.md @@ -224,10 +224,10 @@ make html - [mdformat](https://github.com/executablebooks/mdformat): 检查 markdown 文件的工具 - [docformatter](https://github.com/myint/docformatter): 格式化 docstring 的工具 -yapf 和 isort 的配置可以在 setup.cfg 找到 +yapf 和 isort 的配置可以在 [setup.cfg](https://github.com/open-mmlab/mmengine/blob/main/setup.cfg) 找到 通过配置 [pre-commit hook](https://pre-commit.com/) ,我们可以在提交代码时自动检查和格式化 `flake8`、`yapf`、`isort`、`trailing whitespaces`、`markdown files`,修复 `end-of-files`、`double-quoted-strings`、`python-encoding-pragma`、`mixed-line-ending`,调整 `requirments.txt` 的包顺序。 -pre-commit 钩子的配置可以在 .pre-commit-config 找到。 +pre-commit 钩子的配置可以在 [.pre-commit-config](https://github.com/open-mmlab/mmengine/blob/main/.pre-commit-config.yaml) 找到。 pre-commit 具体的安装使用方式见[拉取请求](#2-配置-pre-commit)。 From 8ec7e26459ee6fdbaf29385943f991fcee257852 Mon Sep 17 00:00:00 2001 From: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com> Date: Tue, 14 Feb 2023 16:55:04 +0800 Subject: [PATCH 6/6] Update docs/zh_cn/notes/contributing.md --- docs/zh_cn/notes/contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh_cn/notes/contributing.md b/docs/zh_cn/notes/contributing.md index 78da9b2db4..a5e52fd8f3 100644 --- a/docs/zh_cn/notes/contributing.md +++ b/docs/zh_cn/notes/contributing.md @@ -227,7 +227,7 @@ make html yapf 和 isort 的配置可以在 [setup.cfg](https://github.com/open-mmlab/mmengine/blob/main/setup.cfg) 找到 通过配置 [pre-commit hook](https://pre-commit.com/) ,我们可以在提交代码时自动检查和格式化 `flake8`、`yapf`、`isort`、`trailing whitespaces`、`markdown files`,修复 `end-of-files`、`double-quoted-strings`、`python-encoding-pragma`、`mixed-line-ending`,调整 `requirments.txt` 的包顺序。 -pre-commit 钩子的配置可以在 [.pre-commit-config](https://github.com/open-mmlab/mmengine/blob/main/.pre-commit-config.yaml) 找到。 +pre-commit 钩子的配置可以在 [.pre-commit-config](https://github.com/open-mmlab/mmengine/blob/main/.pre-commit-config-zh-cn.yaml) 找到。 pre-commit 具体的安装使用方式见[拉取请求](#2-配置-pre-commit)。