| |
|
|
| |
| |
| |
| |
|
|
| |
| |
| |
| |
| |
| |
|
|
| |
| |
| |
|
|
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| name: sanity |
|
|
| on: |
| |
| |
| push: |
| branches: |
| - main |
| - v0.* |
| pull_request: |
| branches: |
| - main |
| - v0.* |
| paths: |
| - "**/*.py" |
| - .github/workflows/sanity.yml |
| - "tests/special_sanity/**" |
|
|
| |
| concurrency: |
| group: ${{ github.workflow }}-${{ github.ref }} |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} |
|
|
| |
| permissions: |
| contents: read |
|
|
| jobs: |
| sanity: |
| runs-on: ubuntu-latest |
| timeout-minutes: 5 |
| strategy: |
| matrix: |
| python-version: ["3.10"] |
| steps: |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 |
| - name: Set up Python ${{ matrix.python-version }} |
| uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b |
| with: |
| python-version: ${{ matrix.python-version }} |
| - name: Install the current repository |
| run: | |
| pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu |
| pip3 install -r requirements.txt |
| pip install -e .[test] |
| - name: Run sanity test |
| run: | |
| pytest -s -x tests/special_sanity |
| - name: Run license test |
| run: | |
| python3 tests/special_sanity/check_license.py --directories . |
| - name: Assert naming convention |
| run: | |
| if grep -rIn --exclude-dir=.git --exclude-dir=.github --exclude-dir=venv --exclude-dir=__pycache__ 'veRL' .; then |
| echo "Please use verl instead of veRL in the codebase" |
| exit 1 |
| fi |
| - name: Assert SGLang naming convention |
| run: | |
| if grep -rIn --exclude-dir=.git --exclude-dir=.github --exclude-dir=venv --exclude-dir=__pycache__ -E 'Sglang|sgLang|sglAng|sglaNg|sglanG' .; then |
| echo "Please use SGLang or sglang as the formal name of SGLang rollout engine" |
| exit 1 |
| fi |
| - name: Validate test folder structure |
| run: python3 tests/special_sanity/validate_structure.py |
| - name: Assert documentation requirement for functions |
| run: python3 tests/special_sanity/validate_imported_docs.py |
| - name: Assert device api usage in verl/recipe |
| run: python3 tests/special_sanity/check_device_api_usage.py --directory ./recipe |
| - name: Assert device api usage in verl/verl |
| run: python3 tests/special_sanity/check_device_api_usage.py --directory ./verl |
| - name: Assert documentation time info |
| run: python3 tests/special_sanity/check_docs_time_info.py |
| - name: Check docstrings for specified files |
| run: python3 tests/special_sanity/check_docstrings.py |
| - name: Check DataProto for specified folders |
| run: python3 tests/special_sanity/check_dataproto_usage.py -d ./verl/workers/engine |
|
|