Skip to content

Commit a33f2e9

Browse files
committed
Update github workflows
1 parent 336d9d6 commit a33f2e9

26 files changed

Lines changed: 2147 additions & 0 deletions
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: checkpoint_converter
2+
# latest version: Megatron-LM core_r0.11.0 https://github.com/NVIDIA/Megatron-LM/tree/core_r0.11.0
3+
4+
on:
5+
# Trigger the workflow on push or pull request,
6+
# but only for the main branch
7+
push:
8+
branches:
9+
- main
10+
- v0.*
11+
pull_request:
12+
branches:
13+
- main
14+
- v0.*
15+
paths:
16+
- "**/*.py"
17+
# Other entrypoints
18+
- "!examples/**"
19+
- "!tests/**"
20+
- "!verl/trainer/main_*.py"
21+
- "!verl/trainer/fsdp_sft_trainer.py"
22+
# Recipes
23+
- "!recipe/**"
24+
# FSDP
25+
- "!verl/workers/**/*dp_*.py"
26+
# Entrypoints
27+
- ".github/workflows/checkpoint_converter.yml"
28+
- ".github/workflows/e2e_ppo_trainer_megatron.yml"
29+
- "examples/data_preprocess/gsm8k.py"
30+
- "tests/e2e/run_ppo_trainer_megatron.sh"
31+
- "verl/trainer/main_ppo.py"
32+
- "verl/trainer/config/ppo_megatron_trainer.yaml"
33+
34+
35+
# Cancel jobs on the same ref if a new one is triggered
36+
concurrency:
37+
group: ${{ github.workflow }}-${{ github.ref }}
38+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
39+
40+
# Declare permissions just read content.
41+
permissions:
42+
contents: read
43+
44+
jobs:
45+
checkpoint_converter:
46+
runs-on: [L20x8]
47+
timeout-minutes: 20 # Increase this timeout value as needed
48+
env:
49+
HTTP_PROXY: ${{ secrets.PROXY_HTTP }}
50+
HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }}
51+
NO_PROXY: "localhost,127.0.0.1"
52+
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
53+
container:
54+
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6-mcore0.12.0-te2.3
55+
options: --gpus all --shm-size=10g
56+
steps:
57+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
58+
with:
59+
fetch-depth: 0
60+
- name: Install the current repository
61+
run: |
62+
pip3 install -e .[test]
63+
- name: Running Huggingface to Megatron dist_ckpt converter (Qwen/Qwen2.5-0.5B)
64+
run: |
65+
ray stop --force
66+
python scripts/converter_hf_to_mcore.py --hf_model_path=${HOME}/models/Qwen/Qwen2.5-0.5B --output_path checkpoints/Qwen/Qwen2.5-0.5B
67+
- name: Running Huggingface to Megatron dist_ckpt converter (deepseek-ai/deepseek-coder-1.3b-instruct)
68+
run: |
69+
ray stop --force
70+
python scripts/converter_hf_to_mcore.py --hf_model_path=${HOME}/models/deepseek-ai/deepseek-coder-1.3b-instruct --output_path checkpoints/deepseek-ai/deepseek-coder-1.3b-instruct
71+
- name: Clean up
72+
run: |
73+
rm -rf checkpoints
74+
checkpoint_converter_large_moe_models:
75+
runs-on: [L20x8]
76+
timeout-minutes: 30 # Increase this timeout value as needed
77+
env:
78+
HTTP_PROXY: ${{ secrets.PROXY_HTTP }}
79+
HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }}
80+
NO_PROXY: "localhost,127.0.0.1"
81+
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
82+
HF_ENDPOINT: "https://hf-mirror.com"
83+
container:
84+
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6-mcore0.12.0-te2.3
85+
options: --gpus all --shm-size=10g
86+
steps:
87+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
88+
with:
89+
fetch-depth: 0
90+
- name: Install the current repository
91+
run: |
92+
pip3 install -e .[test]
93+
- name: Download Model to Use
94+
run: |
95+
huggingface-cli download Qwen/Qwen1.5-MoE-A2.7B-Chat --local-dir ${HOME}/models/Qwen/Qwen1.5-MoE-A2.7B-Chat
96+
export HF_HUB_OFFLINE=1
97+
- name: Running Huggingface to Megatron dist_ckpt CPU converter (Qwen/Qwen1.5-MoE-A2.7B-Chat)
98+
run: |
99+
ray stop --force
100+
python scripts/converter_hf_to_mcore.py --hf_model_path=${HOME}/models/Qwen/Qwen1.5-MoE-A2.7B-Chat --output_path checkpoints/Qwen/Qwen1.5-MoE-A2.7B-Chat --use_cpu_initialization
101+
- name: clean up
102+
run: |
103+
rm -rf checkpoints

.github/workflows/dataset.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: dataset
2+
3+
on:
4+
# Trigger the workflow on push or pull request,
5+
# but only for the main branch
6+
push:
7+
branches:
8+
- main
9+
- v0.*
10+
pull_request:
11+
branches:
12+
- main
13+
paths:
14+
- "verl/utils/**/*.py"
15+
- .github/workflows/dataset.yml
16+
17+
# Cancel jobs on the same ref if a new one is triggered
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
21+
22+
# Declare permissions just read content.
23+
permissions:
24+
contents: read
25+
26+
jobs:
27+
ray:
28+
runs-on: [L20x8]
29+
timeout-minutes: 10 # Increase this timeout value as needed
30+
env:
31+
HTTP_PROXY: ${{ secrets.PROXY_HTTP }}
32+
HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }}
33+
NO_PROXY: "localhost,127.0.0.1,hf-mirror.com"
34+
HF_ENDPOINT: "https://hf-mirror.com"
35+
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
36+
container:
37+
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6-mcore0.12.0-te2.3
38+
options: --gpus all --shm-size=10g
39+
steps:
40+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
41+
with:
42+
fetch-depth: 0
43+
- name: Install the current repository
44+
run: |
45+
pip install -e .[test]
46+
pip install --upgrade "ray>=2.40.0"
47+
pip install cupy-cuda12x
48+
- name: Running dataset tests
49+
run: |
50+
[ ! -d "$HOME/verl-data" ] && git clone --depth 1 https://github.com/eric-haibin-lin/verl-data ~/verl-data
51+
python3 examples/data_preprocess/geo3k.py
52+
pytest -s -x tests/utils/gpu_tests/dataset/test_rl_dataset.py
53+
pytest -s -x tests/utils/gpu_tests/dataset/test_sft_dataset.py
54+
# pytest -s -x tests/utils/gpu_tests/dataset/test_rm_dataset.py
55+
- name: Running ray test using cupy (move it to L20 when dockerfile ready)
56+
run: |
57+
cd tests/ray_gpu
58+
pytest -s -x test_rvdz.py
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: e2e_ascend
2+
3+
on:
4+
# Trigger the workflow on push or pull request,
5+
# but only for the main branch
6+
push:
7+
branches:
8+
- main
9+
- v0.*
10+
pull_request:
11+
branches:
12+
- main
13+
paths:
14+
- "**/*.py"
15+
- .github/workflows/e2e_ascend.yml
16+
17+
# Cancel jobs on the same ref if a new one is triggered
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
21+
22+
permissions:
23+
contents: read
24+
25+
jobs:
26+
test:
27+
name: verl Ascend test (self-host)
28+
runs-on: [self-hosted, npu-0]
29+
timeout-minutes: 30 # Increase this timeout value as needed
30+
container:
31+
image: quay.io/ascend/cann:8.1.rc1-910b-ubuntu22.04-py3.10
32+
volumes:
33+
- /usr/local/dcmi:/usr/local/dcmi
34+
- /usr/local/bin/npu-smi:/usr/local/bin/npu-smi
35+
- /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/
36+
# Use self-host cache speed up pip and model download
37+
# - /home/action/actions-runner/_work/cache:/github/home/.cache/
38+
options: >-
39+
--device /dev/davinci0
40+
--device /dev/davinci_manager
41+
--device /dev/devmm_svm
42+
--device /dev/hisi_hdc
43+
--privileged
44+
--network "host"
45+
--shm-size 2g
46+
env:
47+
HTTP_PROXY: ${{ secrets.PROXY_HTTP }}
48+
HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }}
49+
NO_PROXY: "localhost,127.0.0.1,hf-mirror.com"
50+
HF_ENDPOINT: "https://hf-mirror.com"
51+
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
52+
steps:
53+
- name: Check npu and CANN info
54+
run: |
55+
cat /usr/local/Ascend/ascend-toolkit/latest/"$(uname -i)"-linux/ascend_toolkit_install.info
56+
npu-smi info
57+
- name: Checkout volcengine/verl repo
58+
uses: actions/checkout@v4
59+
- name: Install torch
60+
run: |
61+
pip install torch==2.5.1+cpu --index-url https://download.pytorch.org/whl/cpu
62+
pip install torch-npu==2.5.1
63+
pip install /usr/local/Ascend/ascend-toolkit/latest/lib64/te-0.4.0-py3-none-any.whl
64+
- name: Install vllm
65+
run: |
66+
apt-get update && apt-get install -y git
67+
git clone -b v0.7.3 --depth 1 https://github.com/vllm-project/vllm.git vllm-npu
68+
cd vllm-npu
69+
pip install -r requirements-build.txt
70+
VLLM_TARGET_DEVICE=empty pip install -e . --extra-index https://download.pytorch.org/whl/cpu/
71+
- name: Install vllm-ascend
72+
run: |
73+
pip list
74+
pip show torch
75+
git clone -b v0.7.3 --depth 1 https://github.com/vllm-project/vllm-ascend.git
76+
cd vllm-ascend
77+
export COMPILE_CUSTOM_KERNELS=1
78+
python setup.py install
79+
- name: Install the current repository
80+
run: |
81+
pip3 install hf_transfer peft
82+
pip3 install -r requirements-npu.txt
83+
pip install -e .
84+
- name: Prepare gsm8k dataset
85+
run: |
86+
ray stop --force
87+
python3 examples/data_preprocess/gsm8k.py
88+
- name: Running gsm8k e2e training tests with LoRA on ASCEND NPU
89+
run: |
90+
ray stop --force
91+
bash tests/e2e/sft/run_sft.sh
92+
rm -rf $HOME/ckpts
93+
- name: Running gsm8k e2e training tests with GRPO on ASCEND NPU
94+
run: |
95+
ray stop --force
96+
bash tests/npu/run_qwen2_5_05b_grpo.sh
97+
rm -rf $HOME/ckpts
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: e2e_prime
2+
3+
on:
4+
# Trigger the workflow on push or pull request,
5+
# but only for the main branch
6+
push:
7+
branches:
8+
- disabled_ci
9+
pull_request:
10+
branches:
11+
- disabled_ci
12+
paths:
13+
- "**/*.py"
14+
# Other entrypoints
15+
- "!examples/**"
16+
- "!tests/**"
17+
- "!verl/trainer/main_*.py"
18+
- "!verl/trainer/fsdp_sft_trainer.py"
19+
# Other recipes
20+
- "!recipe/**"
21+
# Megatron
22+
- "!verl/workers/**/megatron_*.py"
23+
# Home
24+
- "recipe/prime"
25+
# Entrypoints
26+
- ".github/workflows/e2e_prime.yml"
27+
- "examples/data_preprocess/gsm8k.py"
28+
- "tests/e2e/run_prime.sh"
29+
30+
# Cancel jobs on the same ref if a new one is triggered
31+
concurrency:
32+
group: ${{ github.workflow }}-${{ github.ref }}
33+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
34+
35+
# Declare permissions just read content.
36+
permissions:
37+
contents: read
38+
39+
jobs:
40+
e2e_prime:
41+
runs-on: [L20x8]
42+
timeout-minutes: 50 # Increase this timeout value as needed
43+
env:
44+
HTTP_PROXY: ${{ secrets.PROXY_HTTP }}
45+
HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }}
46+
NO_PROXY: "localhost,127.0.0.1,hf-mirror.com"
47+
HF_ENDPOINT: "https://hf-mirror.com"
48+
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
49+
container:
50+
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6-mcore0.12.0-te2.3
51+
options: --gpus all --shm-size=10g
52+
steps:
53+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
54+
with:
55+
fetch-depth: 0
56+
- name: Install the current repository
57+
run: |
58+
pip3 install --no-deps -e .[test,gpu]
59+
- name: Prepare gsm8k dataset
60+
run: |
61+
ray stop --force
62+
python3 examples/data_preprocess/gsm8k.py
63+
- name: Running GSM8K E2E with prime alg
64+
run: |
65+
ray stop --force
66+
bash tests/e2e/run_prime.sh

.github/workflows/doc.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: doc_test
2+
3+
on:
4+
# Trigger the workflow on push or pull request,
5+
# but only for the main branch
6+
push:
7+
branches:
8+
- main
9+
- v0.*
10+
pull_request:
11+
branches:
12+
- main
13+
- v0.*
14+
paths:
15+
- "**/*.py"
16+
- "docs/**"
17+
- .github/workflows/doc.yml
18+
19+
# Cancel jobs on the same ref if a new one is triggered
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
23+
24+
# Declare permissions just read content.
25+
permissions:
26+
contents: read # for checkout
27+
pages: write # for deploy-pages
28+
id-token: write # for deploy-pages
29+
30+
jobs:
31+
doc_test:
32+
runs-on: ubuntu-latest
33+
timeout-minutes: 5 # Increase this timeout value as needed
34+
strategy:
35+
matrix:
36+
python-version: ["3.10"]
37+
steps:
38+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
39+
- name: Set up Python ${{ matrix.python-version }}
40+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
41+
with:
42+
python-version: ${{ matrix.python-version }}
43+
- name: Install the current repository
44+
run: |
45+
pip install -e .[test]
46+
pip install -r docs/requirements-docs.txt
47+
48+
- name: Run doc make html
49+
run: |
50+
cd docs
51+
make clean
52+
make html SPHINXOPTS="--keep-going -w _build/sphinx.log"
53+
if grep -q ": ERROR:" _build/sphinx.log; then
54+
echo "🚨 Sphinx doc build contained ERRORs - see _build/sphinx.log"
55+
exit 1
56+
fi

0 commit comments

Comments
 (0)