[Refactor] Update CI and issue template (#1463)

* Update CI

* update issue template

* update

* update collect_env function
pull/1464/head
Yixiao Fang 2023-04-07 14:29:41 +08:00 committed by GitHub
parent 411e05a705
commit 79ddc0f874
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 216 additions and 223 deletions

View File

@ -26,7 +26,7 @@ workflows:
requirements/.* lint_only false
tests/.* lint_only false
.circleci/.* lint_only false
base-revision: dev-1.x
base-revision: main
# this is the path of the configuration we should trigger once
# path filtering and pipeline parameter value updates are
# complete. In this case, we are using the parent dynamic

View File

@ -185,8 +185,8 @@ workflows:
filters:
branches:
ignore:
- dev-1.x
- 1.x
- dev
- main
pr_stage_test:
when:
not:
@ -197,7 +197,7 @@ workflows:
filters:
branches:
ignore:
- dev-1.x
- dev
- build_cpu:
name: minimum_version_cpu
torch: 1.8.0

View File

@ -1,33 +0,0 @@
---
name: 寻求帮助
about: 遇到问题并寻求帮助
title: ''
labels: help wanted
assignees: ''
---
推荐使用英语模板 General question以便你的问题帮助更多人。
### 首先确认以下内容
- 我已经查询了相关的 issue但没有找到需要的帮助。
- 我已经阅读了相关文档,但仍不知道如何解决。
### 描述你遇到的问题
[填写这里]
### 相关信息
1. `pip list | grep "mmcv\|mmcls\|^torch"` 命令的输出
[填写这里]
2. 如果你修改了,或者使用了新的配置文件,请在这里写明
```python
[填写这里]
```
3. 如果你是在训练过程中遇到的问题,请填写完整的训练日志和报错信息
[填写这里]
4. 如果你对 `mmcls` 文件夹下的代码做了其他相关的修改,请在这里写明
[填写这里]

View File

@ -1,34 +0,0 @@
---
name: 新功能
about: 为项目提一个建议
title: '[Feature]'
labels: enhancement
assignees: ''
---
推荐使用英语模板 Feature request以便你的问题帮助更多人。
### 描述这个功能
[填写这里]
### 动机
请简要说明以下为什么需要添加这个新功能
例 1. 现在进行 xxx 的时候不方便
例 2. 最近的论文中提出了有一个很有帮助的 xx
[填写这里]
### 相关资源
是否有相关的官方实现或者第三方实现?这些会很有参考意义。
[填写这里]
### 其他相关信息
其他和这个功能相关的信息或者截图,请放在这里。
另外如果你愿意参与实现这个功能并提交 PR请在这里说明我们将非常欢迎。
[填写这里]

View File

@ -1,44 +0,0 @@
---
name: 报告 Bug
about: 报告问题以帮助我们提升
title: '[Bug]'
labels: bug
assignees: ''
---
推荐使用英语模板 Bug report以便你的问题帮助更多人。
### 描述 bug
简单地描述一下遇到了什么 bug
[填写这里]
### 复现流程
在命令行中执行的详细操作
```shell
[填写这里]
```
### 相关信息
1. `pip list | grep "mmcv\|mmcls\|^torch"` 命令的输出
[填写这里]
2. 如果你修改了,或者使用了新的配置文件,请在这里写明
```python
[填写这里]
```
3. 如果你是在训练过程中遇到的问题,请填写完整的训练日志和报错信息
[填写这里]
4. 如果你对 `mmcls` 文件夹下的代码做了其他相关的修改,请在这里写明
[填写这里]
### 附加内容
任何其他有关该 bug 的信息、截图等
[填写这里]

View File

@ -0,0 +1,69 @@
name: 🐞 Bug report
description: Create a report to help us improve
labels: ["bug"]
title: "[Bug] "
body:
- type: markdown
attributes:
value: |
If you have already identified the reason, we strongly appreciate you creating a new PR according to [the tutorial](https://mmpretrain.readthedocs.io/en/master/community/CONTRIBUTING.html)!
If you need our help, please fill in the following form to help us to identify the bug.
- type: dropdown
id: version
attributes:
label: Branch
description: Which branch/version are you using?
options:
- main branch (mmpretrain version)
- mmcls-1.x branch (v1.0.0rc6 or other 1.x version)
- mmcls-0.x branch (v0.25.0 or other 0.x version)
validations:
required: true
- type: textarea
id: describe
validations:
required: true
attributes:
label: Describe the bug
description: |
Please provide a clear and concise description of what the bug is.
Preferably a simple and minimal code snippet that we can reproduce the error by running the code.
placeholder: |
A clear and concise description of what the bug is.
```python
# Sample code to reproduce the problem
```
```shell
The command or script you run.
```
```
The error message or logs you got, with the full traceback.
```
- type: textarea
id: environment
validations:
required: true
attributes:
label: Environment
description: |
Please run `python -c "import mmpretrain.utils;import pprint;pprint.pp(dict(mmpretrain.utils.collect_env()))"` to collect necessary environment information and paste it here.
placeholder: |
```python
# The output the above command
```
- type: textarea
id: other
attributes:
label: Other information
description: |
Tell us anything else you think we should know.
1. Did you make any modifications on the code or config?
2. What do you think might be the reason?

View File

@ -0,0 +1,29 @@
name: 🚀 Feature request
description: Suggest an idea for this project
labels: ["enhancement"]
title: "[Feature] "
body:
- type: markdown
attributes:
value: |
If you have already implemented the feature, we strongly appreciate you creating a new PR according to [the tutorial](https://mmpretrain.readthedocs.io/en/master/community/CONTRIBUTING.html)!
- type: textarea
id: describe
validations:
required: true
attributes:
label: Describe the feature
description: |
What kind of feature do you want MMPreTrain to add. If there is an official code release or third-party implementation, please also provide the information here, which would be very helpful.
placeholder: |
A clear and concise description of the motivation of the feature.
Ex1. It is inconvenient when \[....\].
Ex2. There is a recent paper \[....\], which is very helpful for \[....\].
- type: checkboxes
id: pr
attributes:
label: Will you implement it?
options:
- label: I would like to implement this feature and create a PR!

View File

@ -0,0 +1,70 @@
name: 🐞 报告 Bug
description: 报告你在使用中遇到的不合预期的情况
labels: ["bug"]
title: "[Bug] "
body:
- type: markdown
attributes:
value: |
我们推荐使用英语模板 Bug report以便你的问题帮助更多人。
如果你已经有了解决方案,我们非常欢迎你直接创建一个新的 PR 来解决这个问题。创建 PR 的流程可以参考[文档](https://mmpretrain.readthedocs.io/zh_CN/master/community/CONTRIBUTING.html)。
如果你需要我们的帮助,请填写以下内容帮助我们定位 Bug。
- type: dropdown
id: version
attributes:
label: 分支
description: 你正在使用的分支/版本是哪个?
options:
- main 分支 (mmpretrain 版本)
- mmcls-1.x 分支 (v1.0.0rc6 或者其它 1.x 版本)
- mmcls-0.x 分支 (v0.25.0 或者其它 0.x 版本)
validations:
required: true
- type: textarea
id: describe
validations:
required: true
attributes:
label: 描述该错误
description: |
请简要说明你遇到的错误。如果可以的话,请提供一个简短的代码片段帮助我们复现这一错误。
placeholder: |
问题的简要说明
```python
# 复现错误的代码片段
```
```shell
# 发生错误时你的运行命令
```
```
错误信息和日志,请展示全部的错误日志和 traceback
```
- type: textarea
id: environment
validations:
required: true
attributes:
label: 环境信息
description: |
请运行指令 `python -c "import mmpretrain.utils;import pprint;pprint.pp(dict(mmpretrain.utils.collect_env()))"` 来收集必要的环境信息,并贴在下方。
placeholder: |
```python
# 上述命令的输出
```
- type: textarea
id: other
attributes:
label: 其他信息
description: |
告诉我们其他有价值的信息。
1. 你是否对代码或配置文件做了任何改动?
2. 你认为可能的原因是什么?

View File

@ -0,0 +1,31 @@
name: 🚀 功能建议
description: 建议一项新的功能
labels: ["enhancement"]
title: "[Feature] "
body:
- type: markdown
attributes:
value: |
推荐使用英语模板 Feature request以便你的问题帮助更多人。
如果你已经实现了该功能,我们非常欢迎你直接创建一个新的 PR 来解决这个问题。创建 PR 的流程可以参考[文档](https://mmpretrain.readthedocs.io/zh_CN/master/community/CONTRIBUTING.html)。
- type: textarea
id: describe
validations:
required: true
attributes:
label: 描述该功能
description: |
你希望 MMPreTrain 添加什么功能?如果存在相关的论文、官方实现或者第三方实现,请同时贴出链接,这将非常有帮助。
placeholder: |
简要说明该功能,及为什么需要该功能
例 1. 现在进行 xxx 的时候不方便
例 2. 最近的论文中提出了有一个很有帮助的 xx
- type: checkboxes
id: pr
attributes:
label: 是否希望自己实现该功能?
options:
- label: 我希望自己来实现这一功能,并向 MMPreTrain 贡献代码!

View File

@ -1,42 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: '[Bug]'
labels: bug
assignees: ''
---
### Describe the bug
A clear and concise description of what the bug is.
[here]
### To Reproduce
The command you executed.
```shell
[here]
```
### Post related information
1. The output of `pip list | grep "mmcv\|mmcls\|^torch"`
[here]
2. Your config file if you modified it or created a new one.
```python
[here]
```
3. Your train log file if you meet the problem during training.
[here]
4. Other code you modified in the `mmcls` folder.
[here]
### Additional context
Add any other context about the problem here.
[here]

View File

@ -1,6 +1,12 @@
blank_issues_enabled: false
contact_links:
- name: MMPreTrain Documentation
- name: 📚 MMPreTrain Documentation (官方文档)
url: https://mmpretrain.readthedocs.io/en/latest/
about: Check if your question is answered in docs
- name: 💬 General questions (寻求帮助)
url: https://github.com/open-mmlab/mmpretrain/discussions
about: Ask general usage questions and discuss with other MMPreTrain community members
- name: 🌐 Explore OpenMMLab (官网)
url: https://openmmlab.com/
about: Get know more about OpenMMLab

View File

@ -1,32 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: '[Feature]'
labels: enhancement
assignees: ''
---
### Describe the feature
[here]
### Motivation
A clear and concise description of the motivation of the feature.
Ex1. It is inconvenient when [....].
Ex2. There is a recent paper [....], which is very helpful for [....].
[here]
### Related resources
If there is an official code release or third-party implementation, please also provide the information here, which would be very helpful.
[here]
### Additional context
Add any other context or screenshots about the feature request here.
If you would like to implement the feature and create a PR, please leave a comment here and that would be much appreciated.
[here]

View File

@ -1,31 +0,0 @@
---
name: General questions
about: 'Ask general questions to get help '
title: ''
labels: help wanted
assignees: ''
---
### Checklist
- I have searched related issues but cannot get the expected help.
- I have read related documents and don't know what to do.
### Describe the question you meet
[here]
### Post related information
1. The output of `pip list | grep "mmcv\|mmcls\|^torch"`
[here]
2. Your config file if you modified it or created a new one.
```python
[here]
```
3. Your train log file if you meet the problem during training.
[here]
4. Other code you modified in the `mmcls` folder.
[here]

View File

@ -1,12 +1,16 @@
# Copyright (c) OpenMMLab. All rights reserved.
import mmcv
from mmengine.utils import get_git_hash
from mmengine.utils.dl_utils import collect_env as collect_base_env
import mmpretrain
def collect_env():
def collect_env(with_torch_comiling_info=False):
"""Collect the information of the running environments."""
env_info = collect_base_env()
env_info['MMPpretrain'] = mmpretrain.__version__ + '+' + get_git_hash()[:7]
env_info['MMCV'] = mmcv.__version__
if not with_torch_comiling_info:
env_info.pop('PyTorch compiling details')
env_info['MMPreTrain'] = mmpretrain.__version__ + '+' + get_git_hash()[:7]
return env_info