| |
|
|
| |
| |
| |
| |
|
|
| |
| |
| |
| |
| |
| |
|
|
| |
| |
| |
|
|
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| name: cpu_unit_tests |
|
|
| on: |
| |
| |
| push: |
| branches: |
| - main |
| - v0.* |
| pull_request: |
| branches: |
| - main |
| - v0.* |
| paths: |
| - "**/*.py" |
| - .github/workflows/cpu_unit_tests.yml |
|
|
| |
| concurrency: |
| group: ${{ github.workflow }}-${{ github.ref }} |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} |
|
|
| |
| permissions: |
| contents: read |
|
|
| env: |
| IMAGE: "verl-ci-cn-beijing.cr.volces.com/verlai/verl:vllm017.dev2" |
| DYNAMIC_RUNNER_ENDPOINT: "https://sd10g3clalm04ug7alq90.apigateway-cn-beijing.volceapi.com/runner" |
|
|
| jobs: |
| setup: |
| if: github.repository_owner == 'verl-project' |
| runs-on: ubuntu-latest |
| outputs: |
| runner-label: ${{ steps.create-runner.outputs.runner-label }} |
| mlp-task-id: ${{ steps.create-runner.outputs.mlp-task-id }} |
| steps: |
| - uses: actions/checkout@v4 |
| - id: create-runner |
| uses: volcengine/vemlp-github-runner@v1 |
| with: |
| mode: "create" |
| faas-url: "${{ env.DYNAMIC_RUNNER_ENDPOINT }}" |
| mlp-image: "${{ env.IMAGE }}" |
|
|
| cpu_unit_tests: |
| needs: setup |
| runs-on: ["${{ needs.setup.outputs.runner-label || 'L20x8' }}"] |
| timeout-minutes: 20 |
| env: |
| HTTP_PROXY: ${{ secrets.PROXY_HTTP }} |
| HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }} |
| NO_PROXY: "localhost,127.0.0.1,hf-mirror.com" |
| HF_ENDPOINT: "https://hf-mirror.com" |
| HF_HUB_ENABLE_HF_TRANSFER: "0" |
| TORCH_COMPILE_DISABLE: 1 |
| TORCHINDUCTOR_DISABLE: 1 |
| steps: |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 |
| with: |
| fetch-depth: 0 |
| - name: Install the current repository |
| run: | |
| pip3 install -r requirements-test.txt |
| pip3 install --no-deps -e . |
| pip3 install --upgrade "transformers>=5.0.0" |
| - name: Download datasets |
| run: | |
| python3 examples/data_preprocess/gsm8k.py --local_dataset_path ${HOME}/models/hf_data/gsm8k |
| python3 examples/data_preprocess/geo3k.py --local_dataset_path ${HOME}/models/hf_data/hiyouga/geometry3k |
| - name: Running CPU unit tests |
| run: | |
| echo '[pytest]' > pytest.ini |
| echo 'python_files = *_on_cpu.py' >> pytest.ini |
| pytest -s -x --asyncio-mode=auto tests/ |
| cleanup: |
| runs-on: ubuntu-latest |
| needs: [setup, cpu_unit_tests] |
| if: always() |
| steps: |
| - id: destroy-runner |
| uses: volcengine/vemlp-github-runner@v1 |
| with: |
| mode: "destroy" |
| faas-url: "${{ env.DYNAMIC_RUNNER_ENDPOINT }}" |
| mlp-task-id: "${{ needs.setup.outputs.mlp-task-id }}" |
|
|