Skip to content

Commit 647ffb3

Browse files
Add roadmap and contributing doc (#431)
1 parent 48abb13 commit 647ffb3

File tree

4 files changed

+341
-0
lines changed

4 files changed

+341
-0
lines changed

CODE_OF_CONDUCT.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series of
86+
actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or permanent
93+
ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within the
113+
community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.1, available at
119+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120+
121+
Community Impact Guidelines were inspired by
122+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123+
124+
For answers to common questions about this code of conduct, see the FAQ at
125+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126+
[https://www.contributor-covenant.org/translations][translations].
127+
128+
[homepage]: https://www.contributor-covenant.org
129+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130+
[Mozilla CoC]: https://github.com/mozilla/diversity
131+
[FAQ]: https://www.contributor-covenant.org/faq
132+
[translations]: https://www.contributor-covenant.org/translations

CONTRIBUTING.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Contributor Guide
2+
3+
_Welcome to offer PRs, bug reports, documentation supplements or other types of contributions to SWIFT!_
4+
5+
## Table of Contents
6+
[Contributor](#🏅 contributor)
7+
[Code of Conduct](#📖 code-of-conduct)
8+
[Contribution Process](#🔁 contribution-process)
9+
[Hardware support](#✅ Hardware support)
10+
11+
## 🏅 Contributor
12+
13+
## 📖 Code of Conduct
14+
Please refer to our [Code of Conduct documentation](https://github.com/modelscope/swift/blob/main/CODE_OF_CONDUCT.md).
15+
16+
## 🔁 Contribution Process
17+
### What We Need
18+
- ROADMAP: We provide a [ROADMAP](https://github.com/modelscope/swift/blob/main/ROADMAP.md) for each iteration of SWIFT, contributors can check our ROADMAP to understand our development progress and plans. Features in **To be Assigned** is available for all developers.
19+
- New Technologies and New Models: SWIFT needs to support more open-source models and datasets, or new technologies that we have not paid attention to. If you are interested please submit a PR to us.
20+
- Technical Propagation: If you are interested in technical propagation, you are welcome to help us write tutorials, documents or videos on any website, and send us the link, we can forward it to more developers.
21+
- Community Contribution: You can write technical articles related to SWIFT, and submit them to us. After review and approval, we will publish them on the official ModelScope accounts (Zhihu, WeChat, etc.), with your name assigned.
22+
23+
### **Certificates**
24+
25+
If needed, we will issue electronic certificates to contributors on behalf of the ModelScope community, to encourage your selfless contributions.
26+
27+
### Submitting PR (Pull Requests)
28+
29+
Any feature development is carried out in the form of Fork and then PR on GitHub.
30+
1. Fork: Go to the [SWIFT](https://github.com/modelscope/swift) page and click the **Fork button**. After completion, a SWIFT code repository will be cloned under your personal organization.
31+
2. Clone: Clone the code repository generated in the first step to your local machine and **create a new branch** for development. During development, please click the **Sync Fork button** in time to synchronize with the `main` branch to prevent code expiration and conflicts.
32+
3. Submit PR: After development and testing, push the code to the remote branch. On GitHub, go to the **Pull Requests page**, create a new PR, select your code branch as the source branch, and the `modelscope/swift:main` branch as the target branch.
33+
> [!NOTE]
34+
>
35+
> Remember to add your name to the Contributor section of CONTRIBUTING.md (this document), so that everyone can see your contribution!
36+
4. Write Description: It is necessary to provide a good feature description in the PR, so that the reviewers know the content of your modification.
37+
5. Review: We hope that the code to be merged is concise and efficient, so we may raise some questions and discuss them. Please note that any issues raised in the review are aimed at the code itself, not at you personally. Once all issues are discussed and resolved, your code will be approved.
38+
39+
### Code Standards and Development Approach
40+
SWIFT has conventional variable naming conventions and development approaches. Please follow these approaches as much as possible during development.
41+
1. Variable names are separated by underscores, and class names are named with the first letter of each word capitalized.
42+
2. All Python indentation uses four spaces instead of a tab.
43+
3. Choose well-known open-source libraries, avoid using closed-source libraries or unstable open-source libraries, and avoid repeating the existing code.
44+
45+
After the PR is submitted, SWIFT will perform two types of tests:
46+
- Code Lint Test: A static code compliance check test. please make sure that you have performed code lint locally in advance.
47+
```shell
48+
pip install pre-commit # In the swift folder
49+
pre-commit run --all-files # Fix the errors reported by pre-commit until all checks are successful
50+
```
51+
- CI Tests: Smoke tests and unit tests, please refer to the next section.
52+
53+
### Running CI Tests
54+
Before submitting the PR, please ensure that your development code is protected by test cases, such as smoke tests for new features, or unit tests for various edge cases. Reviewers will also pay attention to this during code review. At the same time, there will be dedicated services running CI Tests, running all test cases, and the code can only be merged after the test cases pass.
55+
56+
Additionally, since some important tests have been skipped due to long running time, to ensure that your logic is correct, you can run the test locally:
57+
```shell
58+
python tests/llm/test_run.py
59+
```
60+
Please make sure this test can pass normally.
61+
62+
## ✅ Hardware support
63+
64+
SWIFT will provide hardware support for developers, including free GPUs. If needed, please email us ([[email protected]](mailto:[email protected])) or join our WeChat group:
65+
66+
<p align="left">
67+
<img src="asset/wechat.png" width="250" style="display: inline-block;">
68+
</p>

CONTRIBUTING_CN.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# 贡献者指引
2+
3+
*欢迎帮SWIFT提供Feature PR、Bug反馈、文档补充或其他类型的贡献!*
4+
5+
## 目录
6+
7+
[贡献者](#🏅 贡献者)
8+
9+
[代码规约](#📖 代码规约)
10+
11+
[贡献流程](#🔁 贡献流程)
12+
13+
[资源支持](#✅ 资源支持)
14+
15+
## 🏅 贡献者
16+
17+
18+
19+
## 📖 代码规约
20+
21+
请查看我们的[代码规约文档](https://github.com/modelscope/swift/blob/main/CODE_OF_CONDUCT.md).
22+
23+
## 🔁 贡献流程
24+
25+
### 我们需要什么
26+
27+
- ROADMAP:我们为SWIFT提供了每个迭代的[ROADMAP](),贡献者可以查看我们的ROADMAP来了解我们的开发进度和规划。在**待分配**中的feature可以认领并开发。
28+
29+
- 新技术和新模型:SWIFT需要支持更多的开源模型和数据集,或我们没有关注到的新技术,如果您对此有兴趣,可以提交PR给我们
30+
- 技术布道:如果您对技术布道有兴趣,欢迎在任何网站上帮我们撰写教程文档或视频等,并将链接发给我们,我们可以进行转发
31+
- 社区供稿:您可以撰写和SWIFT有关的技术文章,并供稿给我们,我们审核通过后会在魔搭官方账号(知乎、公众号等)上进行发布,并属上您的名字
32+
33+
### 证书
34+
35+
如有需要,我们会以魔搭社区的身份给贡献者颁发电子证书,以鼓励您的无私贡献。
36+
37+
### 提交PR(Pull Requests)
38+
39+
任何feature开发都在github上以先Fork后PR的形式进行。
40+
41+
1. Fork:进入[SWIFT](https://github.com/modelscope/swift)页面后,点击**Fork按钮**执行。完成后会在您的个人组织下克隆出一个SWIFT代码库
42+
43+
2. Clone:将第一步产生的代码库clone到本地并**拉新分支**进行开发,开发中请及时点击**Sync Fork按钮**同步`main`分支,防止代码过期并冲突
44+
45+
3. 提交PR:开发、测试完成后将代码推送到远程分支。在github上点击**Pull Requests页面**,新建一个PR,源分支选择您提交的代码分支,目标分支选择`modelscope/swift:main`分支
46+
47+
> 请记得将自己的名字加入CONTRIBUTING.md(即本文档)的贡献者章节中,让大家看到你的贡献!
48+
49+
4. 撰写描述:在PR中填写良好的feature描述是必要的,让Reviewers知道您的修改内容
50+
51+
5. Review:我们希望合入的代码简洁高效,因此可能会提出一些问题并讨论。请注意,任何review中提出的问题是针对代码本身,而非您个人。在所有问题讨论通过后,您的代码会被通过
52+
53+
### 代码规范和开发方式
54+
55+
SWIFT有约定俗成的变量命名方式和开发方式。在开发中请尽量遵循这些方式。
56+
57+
1. 变量命名以下划线分割,类名以所有单词首字母大写方式命名
58+
2. 所有的python缩进都是四个空格取代一个tab
59+
3. 选用知名的开源库,避免使用闭源库或不稳定的开源库,避免重复造轮子
60+
61+
SWIFT在PR提交后会进行两类测试:
62+
63+
- Code Lint测试 对代码进行静态规范走查的测试,为保证改测试通过,请保证本地预先进行了Code lint。方法是:
64+
65+
```shell
66+
pip install pre-commit
67+
# 在swift文件夹内
68+
pre-commit run --all-files
69+
# 对pre-commit报的错误进行修改,直到所有的检查都是成功状态
70+
```
71+
72+
- CI Tests 冒烟测试和单元测试,请查看下一章节
73+
74+
### Running CI Tests
75+
76+
在提交PR前,请保证您的开发代码已经受到了测试用例的保护。例如,对新功能的冒烟测试,或者各种边缘case的单元测试等。在代码review时Reviewers也会关注这一点。同时,也会有服务专门运行CI Tests,运行所有的测试用例,测试用例通过后代码才可以合并。
77+
78+
另外,由于运行时间过长,我们跳过了部分重要测试,为保证您的逻辑是正确的,可以在本地执行该测试:
79+
80+
```shell
81+
python tests/llm/test_run.py
82+
```
83+
84+
请保证该测试可以正常通过。
85+
86+
## ✅ 资源支持
87+
88+
SWIFT会为开发者提供资源支持,包括免费的GPU算力。如果需要请邮件联系我们([[email protected]](mailto:[email protected]))或加入我们的微信群:
89+
90+
<p align="left">
91+
<img src="asset/wechat.png" width="250" style="display: inline-block;">
92+
</p>

ROADMAP.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# SWIFT V1.7 Features
2+
3+
The development of SWIFT V1.7 is between Feb/1/2024 and Feb/29/2024 ideally.
4+
5+
## Data processing
6+
7+
- Support dataset processing to improve dataset performance. @[tastelikefeet](https://github.com/modelscope/swift/issues?q=is%3Apr+author%3Atastelikefeet)
8+
- Support more dataset, including pretraining dataset @[Jintao-Huang](https://github.com/modelscope/swift/issues?q=is%3Apr+author%3AJintao-Huang)
9+
10+
## Model Evaluation
11+
12+
- Support model evaluation @[Jintao-Huang](https://github.com/modelscope/swift/issues?q=is%3Apr+author%3AJintao-Huang)
13+
- Do evaluation of important tuners and techniques @[tastelikefeet](https://github.com/modelscope/swift/issues?q=is%3Apr+author%3Atastelikefeet)
14+
15+
## Exporting
16+
17+
- Support model exporting to GPTQ&AWQ(Maybe CPP) @[Jintao-Huang](https://github.com/modelscope/swift/issues?q=is%3Apr+author%3AJintao-Huang)
18+
19+
## Deployment
20+
21+
- Support the deployment of vanilla PyTorch code @[Jintao-Huang](https://github.com/modelscope/swift/issues?q=is%3Apr+author%3AJintao-Huang)
22+
- Support VLLM+AWQ/Vanilla AWQ @[Jintao-Huang](https://github.com/modelscope/swift/issues?q=is%3Apr+author%3AJintao-Huang)
23+
24+
## WEB-UI
25+
26+
- Support DPO @[slin000111](https://github.com/slin000111)
27+
- Support deployment(instead of inference) @[slin000111](https://github.com/slin000111)
28+
- Support VL/Audio models @[slin000111](https://github.com/slin000111)
29+
- Support task management @[slin000111](https://github.com/slin000111)
30+
- Support an alternative port of tensorboard @[slin000111](https://github.com/slin000111)
31+
32+
## Training
33+
34+
- Support FSDP @[Jintao-Huang](https://github.com/modelscope/swift/issues?q=is%3Apr+author%3AJintao-Huang)
35+
- RRHF dataset improvement @[tastelikefeet](https://github.com/modelscope/swift/issues?q=is%3Apr+author%3Atastelikefeet)
36+
37+
## SD
38+
39+
- LCM Training @[slin000111](https://github.com/slin000111)
40+
41+
## Multi Modal
42+
43+
- Support more models and datasets @[Jintao-Huang](https://github.com/modelscope/swift/issues?q=is%3Apr+author%3AJintao-Huang)
44+
- Documentation @[Jintao-Huang](https://github.com/modelscope/swift/issues?q=is%3Apr+author%3AJintao-Huang)
45+
46+
## To be Assigned
47+
48+
- *Support ShengTeng GPU when training and inference*
49+
- *Support windows for web-ui*

0 commit comments

Comments
 (0)