|
| 1 | +# # Tests layout |
| 2 | + |
| 3 | +# Each folder under tests/ corresponds to a test category for a sub-namespace in verl. For instance: |
| 4 | +# - `tests/trainer` for testing functionality related to `verl/trainer` |
| 5 | +# - `tests/models` for testing functionality related to `verl/models` |
| 6 | +# - ... |
| 7 | + |
| 8 | +# There are a few folders with `special_` prefix, created for special purposes: |
| 9 | +# - `special_distributed`: unit tests that must run with multiple GPUs |
| 10 | +# - `special_e2e`: end-to-end tests with training/generation scripts |
| 11 | +# - `special_npu`: tests for NPUs |
| 12 | +# - `special_sanity`: a suite of quick sanity tests |
| 13 | +# - `special_standalone`: a set of test that are designed to run in dedicated environments |
| 14 | + |
| 15 | +# Accelerators for tests |
| 16 | +# - By default tests are run with GPU available, except for the ones under `special_npu`, and any test script whose name ends with `on_cpu.py`. |
| 17 | +# - For test scripts with `on_cpu.py` name suffix would be tested on CPU resources in linux environment. |
| 18 | + |
| 19 | +# # Workflow layout |
| 20 | + |
| 21 | +# All CI tests are configured by yaml files in `.github/workflows/`. Here's an overview of all test configs: |
| 22 | +# 1. A list of always triggered CPU sanity tests: `check-pr-title.yml`, `secrets_scan.yml`, `check-pr-title,yml`, `pre-commit.yml`, `doc.yml` |
| 23 | +# 2. Some heavy multi-GPU unit tests, such as `model.yml`, `vllm.yml`, `sgl.yml` |
| 24 | +# 3. End-to-end tests: `e2e_*.yml` |
| 25 | +# 4. Unit tests |
| 26 | +# - `cpu_unit_tests.yml`, run pytest on all scripts with file name pattern `tests/**/test_*_on_cpu.py` |
| 27 | +# - `gpu_unit_tests.yml`, run pytest on all scripts with file without the `on_cpu.py` suffix. |
| 28 | +# - Since cpu/gpu unit tests by default runs all tests under `tests`, please make sure tests are manually excluded in them when |
| 29 | +# - new workflow yaml is added to `.github/workflows` |
| 30 | +# - new tests are added to workflow mentioned in 2. |
| 31 | + |
| 32 | +name: e2e_ppo_trainer_veomni_vllm |
| 33 | + |
| 34 | +on: |
| 35 | + # Trigger the workflow on push or pull request, |
| 36 | + # but only for the main branch. |
| 37 | + # For push, for now only anti-patterns are specified so it is more conservative |
| 38 | + # and achieves higher coverage. |
| 39 | + push: |
| 40 | + branches: |
| 41 | + - main |
| 42 | + - v0.* |
| 43 | + paths: |
| 44 | + - "**/*.py" |
| 45 | + # Other entrypoints |
| 46 | + - "!verl/trainer/fsdp_sft_trainer.py" |
| 47 | + # Megatron |
| 48 | + - "!verl/workers/**/megatron_*.py" |
| 49 | + pull_request: |
| 50 | + branches: |
| 51 | + - main |
| 52 | + - v0.* |
| 53 | + paths: |
| 54 | + - "**/*.py" |
| 55 | + # Other entrypoints |
| 56 | + - "!docker/**" |
| 57 | + # Docs |
| 58 | + - "!**/*.md" |
| 59 | + - "!docs/**" |
| 60 | + - "!examples/**" |
| 61 | + - "!tests/**" |
| 62 | + - "!verl/trainer/main_*.py" |
| 63 | + - "!verl/trainer/fsdp_sft_trainer.py" |
| 64 | + # Megatron |
| 65 | + - "!verl/workers/**/megatron_*.py" |
| 66 | + # Entrypoints |
| 67 | + - ".github/workflows/e2e_ppo_trainer_veomni_vllm.yml" |
| 68 | + - "examples/data_preprocess/gsm8k.py" |
| 69 | + - "examples/data_preprocess/geo3k.py" |
| 70 | + - "tests/special_e2e/run_ppo_trainer_veomni.sh" |
| 71 | + - "verl/trainer/main_ppo.py" |
| 72 | + - "verl/trainer/config/ppo_trainer.yaml" |
| 73 | + |
| 74 | +# Cancel jobs on the same ref if a new one is triggered |
| 75 | +concurrency: |
| 76 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 77 | + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} |
| 78 | + |
| 79 | +# Declare permissions just read content. |
| 80 | +permissions: |
| 81 | + contents: read |
| 82 | + |
| 83 | +env: |
| 84 | + IMAGE: "verl-ci-cn-beijing.cr.volces.com/verlai/verl:vllm012.dev3" |
| 85 | + DYNAMIC_RUNNER_ENDPOINT: "https://sd10g3clalm04ug7alq90.apigateway-cn-beijing.volceapi.com/runner" |
| 86 | + |
| 87 | +jobs: |
| 88 | + setup: |
| 89 | + if: github.repository_owner == 'verl-project' |
| 90 | + runs-on: ubuntu-latest |
| 91 | + outputs: |
| 92 | + runner-label: ${{ steps.create-runner.outputs.runner-label }} |
| 93 | + mlp-task-id: ${{ steps.create-runner.outputs.mlp-task-id }} |
| 94 | + steps: |
| 95 | + - uses: actions/checkout@v4 |
| 96 | + - id: create-runner |
| 97 | + uses: volcengine/vemlp-github-runner@v1 |
| 98 | + with: |
| 99 | + mode: "create" |
| 100 | + faas-url: "${{ env.DYNAMIC_RUNNER_ENDPOINT }}" |
| 101 | + mlp-image: "${{ env.IMAGE }}" |
| 102 | + |
| 103 | + e2e_ppo_trainer_veomni_vllm: |
| 104 | + needs: setup |
| 105 | + runs-on: ["${{ needs.setup.outputs.runner-label || 'L20x8' }}"] |
| 106 | + timeout-minutes: 60 # Increase this timeout value as needed |
| 107 | + env: |
| 108 | + HTTP_PROXY: ${{ secrets.PROXY_HTTP }} |
| 109 | + HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }} |
| 110 | + NO_PROXY: "localhost,127.0.0.1,hf-mirror.com" |
| 111 | + HF_ENDPOINT: "https://hf-mirror.com" |
| 112 | + HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable |
| 113 | + steps: |
| 114 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 115 | + with: |
| 116 | + fetch-depth: 0 |
| 117 | + - name: Install the current repository |
| 118 | + run: | |
| 119 | + pip3 install -r requirements-test.txt |
| 120 | + pip3 install --no-deps -e . |
| 121 | + pip3 install git+https://github.com/ByteDance-Seed/VeOmni.git@v0.1.4 |
| 122 | + - name: Prepare GSM8K dataset |
| 123 | + run: | |
| 124 | + ray stop --force |
| 125 | + python3 examples/data_preprocess/gsm8k.py --local_dataset_path ${HOME}/models/hf_data/gsm8k |
| 126 | + - name: Prepare GEO3K dataset |
| 127 | + run: | |
| 128 | + ray stop --force |
| 129 | + python3 examples/data_preprocess/geo3k.py --local_dataset_path ${HOME}/models/hf_data/hiyouga/geometry3k/ |
| 130 | + - name: Running GSM8K E2E training tests on 8 L20 GPUs with veomni engine (FSDP_SIZE=4, USP=2) |
| 131 | + run: | |
| 132 | + ray stop --force |
| 133 | + VAL_BEFORE_TRAIN=True NUM_GPUS=8 FSDP_SIZE=4 SP_SIZE=2 EP_SIZE=1 VERL_EXP_NAME="qwen2.5-0.5b-function-reward-minimal-fsdp-size4" bash tests/special_e2e/run_ppo_trainer_veomni.sh |
| 134 | + - name: Running GEO3K E2E training tests on 8 L20 GPUs with veomni engine (FSDP_SIZE=8, USP=1) |
| 135 | + run: | |
| 136 | + ray stop --force |
| 137 | + MODEL_ID=Qwen/Qwen3-VL-2B-Instruct TRAIN_FILES=${HOME}/data/geo3k/train.parquet VAL_FILES=${HOME}/data/gsm8k/test.parquet VAL_BEFORE_TRAIN=True NUM_GPUS=8 FSDP_SIZE=8 SP_SIZE=1 EP_SIZE=1 VERL_EXP_NAME="qwen3-2b-vl-function-reward-minimal-fsdp-size8" bash tests/special_e2e/run_ppo_trainer_veomni.sh |
| 138 | +
|
| 139 | + cleanup: |
| 140 | + runs-on: ubuntu-latest |
| 141 | + needs: |
| 142 | + [ |
| 143 | + setup, |
| 144 | + e2e_ppo_trainer_veomni_vllm, |
| 145 | + ] |
| 146 | + if: always() |
| 147 | + steps: |
| 148 | + - id: destroy-runner |
| 149 | + uses: volcengine/vemlp-github-runner@v1 |
| 150 | + with: |
| 151 | + mode: "destroy" |
| 152 | + faas-url: "${{ env.DYNAMIC_RUNNER_ENDPOINT }}" |
| 153 | + mlp-task-id: "${{ needs.setup.outputs.mlp-task-id }}" |
0 commit comments