Skip to content

Commit 73fd68b

Browse files
authored
Merge branch 'verl-project:main' into main
2 parents f333859 + 018f8dc commit 73fd68b

File tree

183 files changed

+5406
-4674
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+5406
-4674
lines changed

.github/workflows/e2e_ascend.yml

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -64,55 +64,6 @@ permissions:
6464
contents: read
6565

6666
jobs:
67-
non_rl_job:
68-
if: github.repository_owner == 'verl-project'
69-
name: E2E Ascend testing for non-RL algorithm scenarios
70-
runs-on: linux-aarch64-a2-4
71-
timeout-minutes: 60
72-
container:
73-
image: swr.ap-southeast-1.myhuaweicloud.com/base_image/ascend-ci/verl/verl:verl-8.3.rc1-910b-ubuntu22.04-py3.11-latest
74-
options: >-
75-
--shm-size 16g
76-
env:
77-
HF_ENDPOINT: "https://hf-mirror.com"
78-
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
79-
steps:
80-
- name: Config third-party dependency download cache
81-
run: |
82-
sed -Ei 's@(ports|archive).ubuntu.com@cache-service.nginx-pypi-cache.svc.cluster.local:8081@g' /etc/apt/sources.list
83-
pip config set global.index-url http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple
84-
pip config set global.trusted-host cache-service.nginx-pypi-cache.svc.cluster.local
85-
- name: Check npu and CANN info
86-
run: |
87-
cat /usr/local/Ascend/ascend-toolkit/latest/"$(uname -i)"-linux/ascend_toolkit_install.info
88-
npu-smi info
89-
- name: Check initial pip list from image
90-
run: |
91-
pip list
92-
- name: Checkout volcengine/verl repo
93-
uses: actions/checkout@v4
94-
with:
95-
fetch-depth: 0
96-
clean: true
97-
- name: Install the current repository
98-
run: |
99-
pip install -r requirements-npu.txt
100-
pip install -e .
101-
- name: Check final pip list
102-
run: |
103-
pip list
104-
- name: Preprocess gsm8k dataset
105-
run: |
106-
python examples/data_preprocess/gsm8k_multiturn_sft.py --local_dataset_path ${HOME}/.cache/datasets/openai/gsm8k
107-
- name: Running gsm8k e2e training tests with peft sft on ASCEND NPU
108-
run: |
109-
ray stop --force
110-
bash tests/special_npu/run_qwen2_5_05b_sft_peft_sp2.sh
111-
- name: Running gsm8k e2e training tests with peft sft on ASCEND NPU (ray mode)
112-
run: |
113-
ray stop --force
114-
mode=ray bash tests/special_npu/run_qwen2_5_05b_sft_peft_sp2.sh
115-
11667
llm_rl_job:
11768
if: github.repository_owner == 'verl-project'
11869
name: E2E Ascend testing for RL training scenarios of LLM models
File renamed without changes.
File renamed without changes.

.github/workflows/stash/e2e_one_step_off_policy_ascend.yml renamed to .github/workflows/e2e_one_step_off_policy_ascend.yml

File renamed without changes.
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
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 }}"

.github/workflows/npu_unit_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
- name: Run all NPU unit tests
110110
run: |
111111
export PYTHONPATH=$PYTHONPATH:/Megatron-LM
112-
pytest -s -x --ignore-glob="*test_special_*.py" --ignore-glob="*on_cpu.py" --ignore-glob="*test_vllm*" --ignore-glob="*_sglang*" --ignore-glob="*_hf_rollout*" --ignore-glob="tests/models/" --ignore-glob="tests/special*" --ignore-glob="tests/experimental" --ignore-glob="tests/workers/reward_model" --ignore-glob="*test_rvdz*" --ignore-glob="*test_ray_collectives*" --ignore-glob="*test_nvtx_profile*" --ignore-glob="tests/checkpoint_engine" --ignore-glob="*test_shared_memory*" --ignore-glob="tests/workers/rollout/rollout_trtllm" tests/
112+
pytest -s -x --ignore-glob="*test_special_*.py" --ignore-glob="*on_cpu.py" --ignore-glob="*test_vllm*" --ignore-glob="*_sglang*" --ignore-glob="*_hf_rollout*" --ignore-glob="tests/models/" --ignore-glob="tests/special*" --ignore-glob="tests/experimental" --ignore-glob="tests/workers/reward_model" --ignore-glob="*test_rvdz*" --ignore-glob="*test_ray_collectives*" --ignore-glob="*test_nvtx_profile*" --ignore-glob="tests/checkpoint_engine" --ignore-glob="*test_shared_memory*" --ignore-glob="tests/workers/rollout/rollout_trtllm" --ignore-glob="*test_fsdp_lora_merge*" tests/
113113
- name: Testing FSDP2 actor functionality
114114
run: |
115115
torchrun --standalone --nnodes=1 --nproc-per-node=2 tests/workers/actor/test_special_dp_actor.py

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ repos:
4040
hooks:
4141
- id: compileall
4242
name: Compile all python files
43-
entry: sh -c 'PYTHONWARNINGS=error python3 -m compileall -q .'
43+
entry: sh -c 'PYTHONWARNINGS=error python3 -m compileall -q . -x "(^|[\\/])(\.venv|venv|\.git)([\\/]|$)"'
4444
language: python
4545
pass_filenames: false

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ verl is fully embracing FSDP2! FSDP2 is recommended by torch distributed team, p
182182
actor_rollout_ref.ref.strategy=fsdp2
183183
actor_rollout_ref.actor.strategy=fsdp2
184184
critic.strategy=fsdp2
185-
reward_model.strategy=fsdp2
186185
```
187186

188187
Furthermore, FSDP2 cpu offloading is compatible with gradient accumulation. You can turn it on to save memory with `actor_rollout_ref.actor.fsdp_config.offload_policy=True`. For more details, see https://github.com/volcengine/verl/pull/1026

docker/ascend/Dockerfile.ascend_8.3.rc1_a2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RUN apt-get update -y && \
66
apt-get install -y --no-install-recommends gcc g++ cmake libnuma-dev wget git curl jq vim build-essential && \
77
apt-get clean && \
88
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
9-
pip install --upgrade pip setuptools packaging && \
9+
pip install --upgrade pip packaging setuptools==80.10.2 && \
1010
pip cache purge
1111

1212
# Prepare repositories with low update frequency

docker/ascend/Dockerfile.ascend_8.3.rc1_a3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RUN apt-get update -y && \
66
apt-get install -y --no-install-recommends gcc g++ cmake libnuma-dev wget git curl jq vim build-essential && \
77
apt-get clean && \
88
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
9-
pip install --upgrade pip setuptools packaging && \
9+
pip install --upgrade pip packaging setuptools==80.10.2 && \
1010
pip cache purge
1111

1212
# Prepare repositories with low update frequency

0 commit comments

Comments
 (0)