|
| 1 | +# Contributing to verl |
| 2 | + |
| 3 | +Thank you for considering a contribution to verl! We welcome contributions of any kind - bug fixes, enhancements, documentation improvements, or even just feedback. Whether you're an experienced developer or this is your first open-source project, your help is invaluable. |
| 4 | + |
| 5 | +Your support can take many forms: |
| 6 | +- Report issues or unexpected behaviors. |
| 7 | +- Suggest or implement new features. |
| 8 | +- Improve or expand documentation. |
| 9 | +- Review pull requests and assist other contributors. |
| 10 | +- Spread the word: share verl in blog posts, social media, or give the repo a ⭐. |
| 11 | + |
| 12 | +## Finding Issues to Contribute |
| 13 | + |
| 14 | +Looking for ways to dive in? Check out these issues: |
| 15 | +- [Good first issues](https://github.com/volcengine/verl/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22good%20first%20issue%22) |
| 16 | +- [Call for contribution](https://github.com/volcengine/verl/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22call%20for%20contribution%22) |
| 17 | +Furthermore, you can learn the development plan and roadmap via [RFC](https://github.com/volcengine/verl/issues?q=is%3Aissue%20state%3Aopen%20label%3ARFC) and [Roadmap](https://github.com/volcengine/verl/issues?q=state%3Aopen%20label%3A%22roadmap%22). |
| 18 | + |
| 19 | + |
| 20 | +## Developing |
| 21 | + |
| 22 | +- **Python-only**: install verl via `pip install -e .[test,vllm]` or `pip install -e .[test,sglang]` and iterate quickly. For full dependency setup, check out the verl [installation doc](https://verl.readthedocs.io/en/latest/start/install.html). |
| 23 | + |
| 24 | +## Code Linting and Formatting |
| 25 | + |
| 26 | +We rely on pre-commit to keep our code consistent. To set it up: |
| 27 | + |
| 28 | +```bash |
| 29 | +pip install pre-commit |
| 30 | +pre-commit install |
| 31 | +# for staged changes |
| 32 | +pre-commit run |
| 33 | +# for all files in the repo |
| 34 | +# pre-commit run --all-files |
| 35 | +``` |
| 36 | + |
| 37 | +## Testing |
| 38 | + |
| 39 | +Our test suites run on GitHub Actions. Check these workflows for details: |
| 40 | +- [GPU unit tests](https://github.com/volcengine/verl/blob/main/.github/workflows/gpu_unit_tests.yml) |
| 41 | +- [CPU unit tests](https://github.com/volcengine/verl/blob/main/.github/workflows/cpu_unit_tests.yml) |
| 42 | +- [vLLM tests](https://github.com/volcengine/verl/blob/main/.github/workflows/vllm.yml) |
| 43 | +- [SGLang tests](https://github.com/volcengine/verl/blob/main/.github/workflows/sgl.yml) |
| 44 | + |
| 45 | +### Adding CI tests |
| 46 | + |
| 47 | +If possible, please add CI test(s) for your new feature: |
| 48 | + |
| 49 | +1. Find the most relevant workflow yml file, which usually corresponds to a `hydra` default config (e.g. `ppo_trainer`, `ppo_megatron_trainer`, `sft_trainer`, etc). |
| 50 | +2. Add related path patterns to the `paths` section if not already included. |
| 51 | +3. Minimize the workload of the test script(s) (see existing scripts for examples). |
| 52 | + |
| 53 | +## Building the Docs |
| 54 | +``` |
| 55 | +# Ensure verl is on your PYTHONPATH, e.g.: |
| 56 | +pip install -e .[test] |
| 57 | +
|
| 58 | +# Install documentation dependencies |
| 59 | +pip install -r requirements-docs.txt |
| 60 | +
|
| 61 | +# Generate HTML docs |
| 62 | +make clean |
| 63 | +make html |
| 64 | +
|
| 65 | +# Preview locally |
| 66 | +python -m http.server -d _build/html/ |
| 67 | +``` |
| 68 | +Open your browser at http://localhost:8000 to explore the docs. |
| 69 | + |
| 70 | +## Pull Requests & Code Reviews |
| 71 | + |
| 72 | +Thanks for submitting a PR! To streamline reviews: |
| 73 | +- Follow our Pull Request Template for title format and checklist. |
| 74 | +- Adhere to our pre-commit lint rules and ensure all checks pass. |
| 75 | +- Update docs for any user-facing changes. |
| 76 | +- Add or update tests in the CI workflows, or explain why tests aren't applicable. |
| 77 | + |
| 78 | +## License |
| 79 | + |
| 80 | +See the [LICENSE](https://github.com/volcengine/verl/blob/main/LICENSE) file for full details. |
| 81 | + |
| 82 | +## Thank You |
| 83 | + |
| 84 | +We appreciate your contributions to verl. Your efforts help make the project stronger and more user-friendly. Happy coding! |
| 85 | + |
0 commit comments