Welcome to offer PRs, bug reports, documentation supplements or other types of contributions to SWIFT!
Please refer to our Code of Conduct documentation.
Any feature development is carried out in the form of Fork and then PR on GitHub.
Fork: Go to the SWIFT page and click the Fork button. After completion, a SWIFT code repository will be cloned under your personal organization.
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.
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.
Write Description: It is necessary to provide a good feature description in the PR, so that the reviewers know the content of your modification.
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.
SWIFT has conventional variable naming conventions and development approaches. Please follow these approaches as much as possible during development.
After the PR is submitted, SWIFT will perform two types of tests:
pip install pre-commit # In the swift folder
pre-commit run --all-files # Fix the errors reported by pre-commit until all checks are successful
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.
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:
python tests/llm/test_run.py
Please make sure this test can pass normally.
SWIFT will provide hardware support for developers, including free GPUs. If needed, please email us (contact@modelscope.cn) or join our WeChat group:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。