Skip to content

Commit cd50cba

Browse files
taichengguoclaude
andcommitted
Release MTSQL-R1 codebase
Initial public release of training, rollout, and evaluation code for long-horizon multi-turn Text-to-SQL. Built on verl; includes GRPO configs, multi-turn tool configs, and outcome/process reward functions for CoSQL and SParC. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 618563a commit cd50cba

873 files changed

Lines changed: 147595 additions & 9 deletions

File tree

Some content is hidden

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

‎.github/dependabot.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Enabled the dependabot to check the dependencies of the project
2+
## Dependabot will open pull requests to update dependencies automatically
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: pip
7+
directory: "/"
8+
schedule:
9+
interval: weekly

‎.github/workflows/checkpoints.yml‎

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: checkpoints
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.2.x
10+
paths:
11+
- "**/*.py"
12+
- .github/workflows/checkpoints.yml
13+
pull_request:
14+
branches:
15+
- main
16+
- v0.2.x
17+
paths:
18+
- "**/*.py"
19+
- "../../verl_back/trainer/config/*.yaml"
20+
- .github/workflows/checkpoints.yml
21+
- "tests/e2e/*.sh"
22+
23+
# Cancel jobs on the same ref if a new one is triggered
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.ref }}
26+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
27+
28+
# Declare permissions just read content.
29+
permissions:
30+
contents: read
31+
32+
jobs:
33+
e2e_gsm8k_megatron:
34+
runs-on: [self-hosted, l20-0]
35+
timeout-minutes: 40 # Increase this timeout value as needed
36+
env:
37+
HTTP_PROXY: ${{ secrets.PROXY_HTTP }}
38+
HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }}
39+
NO_PROXY: "localhost,127.0.0.1"
40+
HF_HUB_ENABLE_HF_TRANSFER: 1
41+
container:
42+
image: whatcanyousee/verl:vemlp-th2.4.0-cu124-vllm0.6.3-ray2.10-te2.0-megatron0.11.0-v0.0.6
43+
options: --gpus all --shm-size=10g
44+
steps:
45+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
46+
with:
47+
fetch-depth: 0
48+
- name: Install the current repository
49+
run: |
50+
pip3 install hf_transfer
51+
pip3 install -e .[test]
52+
- name: Prepare gsm8k dataset
53+
run: |
54+
python3 examples/data_preprocess/gsm8k.py
55+
- name: Running Checkpoint Integration Test (Qwen Megatron)
56+
run: |
57+
ray stop --force
58+
export PYTHONPATH=$PYTHONPATH:/opt/nvidia/Megatron-LM
59+
bash tests/checkpoint/run_qwen_megatron_ckpt.sh
60+
- name: Running Checkpoint Integration Test (Deepseek Megatron)
61+
run: |
62+
ray stop --force
63+
export PYTHONPATH=$PYTHONPATH:/opt/nvidia/Megatron-LM
64+
bash tests/checkpoint/run_deepseek_megatron_ckpt.sh

‎.github/workflows/dataset.yml‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: dataset
2+
3+
on:
4+
# Trigger the workflow on push or pull request,
5+
# but only for the main branch
6+
pull_request:
7+
branches:
8+
- main
9+
paths:
10+
- "../../verl_back/utils/**/*.py"
11+
- .github/workflows/dataset.yml
12+
- "!verl/workers/fsdp_workers.py"
13+
- "!verl/workers/megatron_workers.py"
14+
- "!recipe/**"
15+
16+
# Cancel jobs on the same ref if a new one is triggered
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
20+
21+
# Declare permissions just read content.
22+
permissions:
23+
contents: read
24+
25+
jobs:
26+
ray:
27+
runs-on: [L20x8]
28+
timeout-minutes: 10 # Increase this timeout value as needed
29+
env:
30+
HTTP_PROXY: ${{ secrets.PROXY_HTTP }}
31+
HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }}
32+
NO_PROXY: "localhost,127.0.0.1"
33+
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
34+
container:
35+
image: whatcanyousee/verl:ngc-th2.6.0-cu124-vllm0.8.2-mcore0.11.0-te2.0
36+
options: --gpus all --shm-size=10g
37+
steps:
38+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
39+
with:
40+
fetch-depth: 0
41+
- name: Install the current repository
42+
run: |
43+
pip install -e .[test]
44+
pip install --upgrade "ray>=2.40.0"
45+
pip install cupy-cuda12x
46+
- name: Running dataset tests
47+
run: |
48+
[ ! -d "$HOME/verl-data" ] && git clone --depth 1 https://github.com/eric-haibin-lin/verl-data ~/verl-data
49+
python3 examples/data_preprocess/geo3k.py
50+
pytest -s -x tests/verl/utils/dataset/test_rl_dataset.py
51+
pytest -s -x tests/verl/utils/dataset/test_sft_dataset.py
52+
pytest -s -x tests/verl/utils/test_import_utils.py
53+
# pytest -s -x tests/verl/utils/dataset/test_rm_dataset.py
54+
- name: Running ray test using cupy (move it to L20 when dockerfile ready)
55+
run: |
56+
cd tests/ray
57+
pytest -s -x test_rvdz.py

‎.github/workflows/e2e_ascend.yml‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: e2e_ascend
2+
3+
on:
4+
# Trigger the workflow on push or pull request,
5+
# but only for the main branch
6+
pull_request:
7+
branches:
8+
- main
9+
paths:
10+
- "**/*.py"
11+
- .github/workflows/e2e_ascend.yml
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
test:
18+
name: verl Ascend test (self-host)
19+
runs-on: [self-hosted, npu-0]
20+
timeout-minutes: 5 # Increase this timeout value as needed
21+
container:
22+
image: quay.io/ascend/cann:8.0.0-910b-ubuntu22.04-py3.10
23+
volumes:
24+
- /usr/local/dcmi:/usr/local/dcmi
25+
- /usr/local/bin/npu-smi:/usr/local/bin/npu-smi
26+
- /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/
27+
# Use self-host cache speed up pip and model download
28+
# - /home/action/actions-runner/_work/cache:/github/home/.cache/
29+
options: >-
30+
--device /dev/davinci0
31+
--device /dev/davinci_manager
32+
--device /dev/devmm_svm
33+
--device /dev/hisi_hdc
34+
--privileged
35+
--network "host"
36+
steps:
37+
- name: Check npu and CANN info
38+
run: |
39+
cat /usr/local/Ascend/ascend-toolkit/latest/"$(uname -i)"-linux/ascend_toolkit_install.info
40+
npu-smi info
41+
- name: Checkout volcengine/verl repo
42+
uses: actions/checkout@v4
43+
- name: Run test
44+
run: |
45+
lscpu

‎.github/workflows/e2e_dapo.yml‎

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: e2e_dapo
2+
3+
on:
4+
# Trigger the workflow on push or pull request,
5+
# but only for the main branch
6+
pull_request:
7+
branches:
8+
- main
9+
- v0.2.x
10+
paths:
11+
- "**/*.py"
12+
# Home
13+
- "recipe/dapo/src"
14+
# Entrypoints
15+
- ".github/workflows/e2e_dapo.yml"
16+
- "examples/data_preprocess/gsm8k.py"
17+
- "tests/e2e/run_dapo.sh"
18+
- "!examples"
19+
- "!verl/trainer/main_*.py"
20+
- "!verl/trainer/fsdp_sft_trainer.py"
21+
# Megatron
22+
- "!verl/workers/**/megatron_*.py"
23+
24+
25+
# Declare permissions just read content.
26+
permissions:
27+
contents: read
28+
29+
jobs:
30+
e2e_dapo:
31+
runs-on: [L20x8]
32+
timeout-minutes: 40 # Increase this timeout value as needed
33+
env:
34+
HTTP_PROXY: ${{ secrets.PROXY_HTTP }}
35+
HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }}
36+
NO_PROXY: "localhost,127.0.0.1"
37+
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
38+
container:
39+
image: whatcanyousee/verl:ngc-th2.6.0-cu124-vllm0.8.2-mcore0.11.0-te2.0
40+
options: --gpus all --shm-size=10g
41+
steps:
42+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
43+
with:
44+
fetch-depth: 0
45+
- name: Install the current repository
46+
run: |
47+
pip3 install -e .[test,gpu]
48+
- name: Prepare GSM8K dataset
49+
run: |
50+
python3 examples/data_preprocess/gsm8k.py
51+
- name: Running the E2E test with the DAPO algorithm
52+
run: |
53+
ray stop --force
54+
bash tests/e2e/run_dapo.sh
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: e2e_digit_completion
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.2.x
10+
paths:
11+
- "**/*.py"
12+
- .github/workflows/e2e_digit_completion.yml
13+
pull_request:
14+
branches:
15+
- main
16+
- v0.2.x
17+
paths:
18+
- "**/*.py"
19+
- "../../verl_back/trainer/config/*.yaml"
20+
- .github/workflows/e2e_digit_completion.yml
21+
- "tests/e2e/*.sh"
22+
23+
# Cancel jobs on the same ref if a new one is triggered
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.ref }}
26+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
27+
28+
# Declare permissions just read content.
29+
permissions:
30+
contents: read
31+
32+
jobs:
33+
e2e_digit_completion:
34+
runs-on: [self-hosted, l20-0]
35+
timeout-minutes: 20 # Increase this timeout value as needed
36+
env:
37+
HTTP_PROXY: ${{ secrets.PROXY_HTTP }}
38+
HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }}
39+
NO_PROXY: "localhost,127.0.0.1"
40+
HF_HUB_ENABLE_HF_TRANSFER: 1
41+
container:
42+
image: verlai/verl:vemlp-th2.4.0-cu124-vllm0.6.3-ray2.10-te1.7-v0.0.3
43+
options: --gpus all --shm-size=10g
44+
steps:
45+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
46+
with:
47+
fetch-depth: 0
48+
- name: Install the current repository
49+
run: |
50+
pip3 install hf_transfer
51+
pip3 install -e .[test]
52+
- name: Running digit completon e2e training tests on 8 L20 GPUs
53+
run: |
54+
ray stop --force
55+
bash tests/e2e/run_ray_trainer.sh
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: e2e_digit_completion_fire
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+
paths:
10+
- "**/*.py"
11+
- .github/workflows/e2e_digit_completion_fire.yml
12+
pull_request:
13+
branches:
14+
- main
15+
paths:
16+
- "**/*.py"
17+
- .github/workflows/e2e_digit_completion_fire.yml
18+
- "tests/e2e/*.sh"
19+
20+
# Declare permissions just read content.
21+
permissions:
22+
contents: read
23+
24+
jobs:
25+
e2e_digit_completion:
26+
runs-on: [self-hosted, l20-0]
27+
timeout-minutes: 20 # Increase this timeout value as needed
28+
env:
29+
HTTP_PROXY: ${{ secrets.PROXY_HTTP }}
30+
HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }}
31+
NO_PROXY: "localhost,127.0.0.1"
32+
HF_HUB_ENABLE_HF_TRANSFER: 1
33+
container:
34+
image: verlai/verl:vemlp-th2.4.0-cu124-vllm0.6.3-ray2.10-te1.7-v0.0.3
35+
options: --gpus all --shm-size=10g
36+
steps:
37+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38+
with:
39+
fetch-depth: 0
40+
- name: Install the current repository
41+
run: |
42+
pip3 install hf_transfer
43+
pip3 install -e .[test]
44+
- name: Running digit completon e2e training tests on 8 L20 GPUs
45+
run: |
46+
ray stop --force
47+
bash tests/e2e/run_ray_trainer_fire_sampling.sh
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: e2e_eval_aime24
2+
3+
on:
4+
# Trigger the workflow on push or pull request,
5+
# but only for the main branch
6+
pull_request:
7+
branches:
8+
- main
9+
paths:
10+
- "**/*.py"
11+
# Home
12+
- "recipe/r1"
13+
- "!recipe/r1/README.md"
14+
# Entrypoints
15+
- ".github/workflows/e2e_eval_aime24.yml"
16+
- "tests/e2e/run_r1_distill_qwen_aime24_eval.sh"
17+
- "../../verl_back/trainer/main_generation.py"
18+
- "../../verl_back/trainer/config/generation.yaml"
19+
- "!examples"
20+
- "!verl/trainer/main_*.py"
21+
- "!verl/trainer/fsdp_sft_trainer.py"
22+
# Other recipes
23+
- "!recipe"
24+
25+
# Declare permissions just read content.
26+
permissions:
27+
contents: read
28+
29+
jobs:
30+
e2e_eval_aime24:
31+
runs-on: [L20x8]
32+
timeout-minutes: 40 # Increase this timeout value as needed
33+
env:
34+
HTTP_PROXY: ${{ secrets.PROXY_HTTP }}
35+
HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }}
36+
NO_PROXY: "localhost,127.0.0.1"
37+
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
38+
container:
39+
image: whatcanyousee/verl:ngc-th2.6.0-cu124-vllm0.8.2-mcore0.11.0-te2.0
40+
options: --gpus all --shm-size=10g
41+
steps:
42+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
43+
with:
44+
fetch-depth: 0
45+
- name: Install the current repository
46+
run: |
47+
pip3 install -e .[test,gpu,math]
48+
- name: Prepare aime24 dataset
49+
run: |
50+
ray stop --force
51+
python3 recipe/r1/data_process.py --task aime2024
52+
- name: Running generation and evaluation in AIME 2024
53+
run: |
54+
ray stop --force
55+
bash tests/e2e/run_r1_distill_qwen_aime24_eval.sh

0 commit comments

Comments
 (0)