|
| 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 | + |
| 33 | +name: e2e_disco |
| 34 | + |
| 35 | +on: |
| 36 | + # Trigger the workflow on push or pull request, |
| 37 | + # but only for the main branch |
| 38 | + # For push, for now only anti-patterns are specified so it is more conservative |
| 39 | + # and achieves higher coverage. |
| 40 | + push: |
| 41 | + branches: |
| 42 | + - main |
| 43 | + - v0.* |
| 44 | + paths: |
| 45 | + - "verl/*.py" |
| 46 | + # Other entrypoints |
| 47 | + - "!examples/*trainer*" |
| 48 | + - "!tests/**" |
| 49 | + - "!verl/trainer/main_*.py" |
| 50 | + - "!verl/trainer/fsdp_sft_trainer.py" |
| 51 | + # Megatron |
| 52 | + - "!verl/workers/**/megatron_*.py" |
| 53 | + - "!recipe/**" |
| 54 | + - "recipe/disco" |
| 55 | + # Entrypoints |
| 56 | + - ".github/workflows/e2e_disco.yml" |
| 57 | + - "examples/data_preprocess/gsm8k.py" |
| 58 | + - "tests/special_e2e/run_disco.sh" |
| 59 | + pull_request: |
| 60 | + branches: |
| 61 | + - main |
| 62 | + - v0.* |
| 63 | + paths: |
| 64 | + - "**/*.py" |
| 65 | + # Other entrypoints |
| 66 | + - "!examples/**" |
| 67 | + - "!tests/**" |
| 68 | + - "!verl/trainer/main_*.py" |
| 69 | + - "!verl/trainer/fsdp_sft_trainer.py" |
| 70 | + # Other recipes |
| 71 | + - "!recipe/**" |
| 72 | + # Megatron |
| 73 | + - "!verl/workers/**/megatron_*.py" |
| 74 | + # Home |
| 75 | + - "recipe/disco" |
| 76 | + # Entrypoints |
| 77 | + - ".github/workflows/e2e_disco.yml" |
| 78 | + - "examples/data_preprocess/gsm8k.py" |
| 79 | + - "tests/special_e2e/run_disco.sh" |
| 80 | + |
| 81 | +# Cancel jobs on the same ref if a new one is triggered |
| 82 | +concurrency: |
| 83 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 84 | + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} |
| 85 | + |
| 86 | +# Declare permissions just read content. |
| 87 | +permissions: |
| 88 | + contents: read |
| 89 | + |
| 90 | +jobs: |
| 91 | + e2e_disco: |
| 92 | + runs-on: [L20x8] |
| 93 | + timeout-minutes: 40 # Increase this timeout value as needed |
| 94 | + env: |
| 95 | + HTTP_PROXY: ${{ secrets.PROXY_HTTP }} |
| 96 | + HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }} |
| 97 | + NO_PROXY: "localhost,127.0.0.1,hf-mirror.com" |
| 98 | + HF_ENDPOINT: "https://hf-mirror.com" |
| 99 | + HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable |
| 100 | + container: |
| 101 | + image: verlai/verl:app-verl0.5-transformers4.55.4-vllm0.10.0-mcore0.13.0-te2.2 |
| 102 | + options: --gpus all --shm-size=10g |
| 103 | + steps: |
| 104 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 105 | + with: |
| 106 | + fetch-depth: 0 |
| 107 | + - name: Install the current repository |
| 108 | + run: | |
| 109 | + pip3 install --no-deps -e .[test,gpu] |
| 110 | + - name: Prepare GSM8K dataset |
| 111 | + run: | |
| 112 | + python3 examples/data_preprocess/gsm8k.py |
| 113 | + - name: Running the E2E test with the DisCO algorithm |
| 114 | + run: | |
| 115 | + ray stop --force |
| 116 | + bash tests/special_e2e/run_disco.sh |
0 commit comments