Skip to content

Commit c389ba6

Browse files
committed
Merge branch 'main' into dev/cyx/rec_gspo_variant
2 parents be4e78e + 106e69c commit c389ba6

File tree

22 files changed

+327
-35
lines changed

22 files changed

+327
-35
lines changed

.github/workflows/docker.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121
jobs:
2222
build-and-push-image:
2323
runs-on: self-hosted
24-
timeout-minutes: 240 # wait up to 4 hours
24+
timeout-minutes: 480 # wait up to 8 hours
2525
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
2626
permissions:
2727
contents: read
@@ -61,8 +61,8 @@ jobs:
6161
with:
6262
context: trinity-${{ github.run_id }}
6363
push: true
64-
file: trinity-${{ github.run_id }}/scripts/docker/Dockerfile
65-
shm-size: 64g
64+
file: trinity-${{ github.run_id }}/scripts/docker/Dockerfile.uv
65+
shm-size: 128g
6666
tags: ${{ steps.meta.outputs.tags }}
6767
labels: ${{ steps.meta.outputs.labels }}
6868

.github/workflows/docker/docker-compose.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
services:
22
trinity-node-1:
3-
image: trinity-rft-unittest:20251030
3+
image: trinity-rft-unittest:20251225
44
pull_policy: never
5-
command: sh -c "pip install -e .[dev] && ray start --head --dashboard-host 0.0.0.0 --include-dashboard true --block"
5+
command: bash -c "source /opt/venv/bin/activate && uv pip install -e .[dev] && ray start --head --dashboard-host 0.0.0.0 --include-dashboard true --block"
66
environment:
77
- HF_ENDPOINT=https://hf-mirror.com
88
- RAY_ADDRESS=auto
@@ -13,6 +13,7 @@ services:
1313
- TRINITY_MODEL_PATH=/mnt/models/Qwen3-0.6B
1414
- TRINITY_API_MODEL_PATH=/mnt/models/Qwen3-1.7B
1515
- TRINITY_VLM_MODEL_PATH=/mnt/models/Qwen2.5-VL-3B
16+
- VIRTUAL_ENV=/opt/venv
1617
working_dir: /workspace
1718
networks:
1819
- trinity-network
@@ -29,14 +30,15 @@ services:
2930
capabilities: [gpu]
3031

3132
trinity-node-2:
32-
image: trinity-rft-unittest:20251030
33+
image: trinity-rft-unittest:20251225
3334
pull_policy: never
34-
command: sh -c "pip install -e .[dev] && ray start --address=trinity-node-1:6379 --block"
35+
command: bash -c "source /opt/venv/bin/activate && uv pip install -e .[dev] && ray start --address=trinity-node-1:6379 --block"
3536
environment:
3637
- HF_ENDPOINT=https://hf-mirror.com
3738
- TRINITY_CHECKPOINT_ROOT_DIR=/mnt/checkpoints
3839
- TRINITY_TASKSET_PATH=/mnt/data
3940
- TRINITY_MODEL_PATH=/mnt/models/Qwen3-1.7B
41+
- VIRTUAL_ENV=/opt/venv
4042
working_dir: /workspace
4143
volumes:
4244
- trinity-volume:/mnt

.github/workflows/pre-commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ jobs:
99
- uses: actions/checkout@v4
1010
- uses: actions/setup-python@v4
1111
with:
12-
python-version: '3.10'
12+
python-version: '3.12'
1313
- uses: pre-commit/[email protected]

.github/workflows/sphinx-doc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest]
19-
python-version: ['3.10']
19+
python-version: ['3.12']
2020
env:
2121
OS: ${{ matrix.os }}
22-
PYTHON: '3.10'
22+
PYTHON: '3.12'
2323
steps:
2424
- name: Free up disk space
2525
run: |

.github/workflows/unittest.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ jobs:
3434
MAX_RETRIES=20
3535
RETRY_INTERVAL=5
3636
for i in $(seq 1 $MAX_RETRIES); do
37-
docker compose exec trinity-node-1 ray status && docker compose exec trinity-node-2 ray status && break
37+
if docker compose exec trinity-node-1 bash -c "source /opt/venv/bin/activate && ray status" \
38+
&& docker compose exec trinity-node-2 bash -c "source /opt/venv/bin/activate && ray status"; then
39+
break
40+
fi
3841
echo "Waiting for ray cluster to be ready... ($i/$MAX_RETRIES)"
3942
sleep $RETRY_INTERVAL
4043
if [ "$i" -eq "$MAX_RETRIES" ]; then
@@ -76,12 +79,12 @@ jobs:
7679
TYPE="${{ steps.test_type.outputs.type }}"
7780
if [ "$TYPE" = "all" ]; then
7881
echo "tests_run=true" >> $GITHUB_ENV
79-
docker compose exec trinity-node-1 pytest tests -v -s --ctrf report.json
82+
docker compose exec trinity-node-1 bash -c "source /opt/venv/bin/activate && pytest tests -v -s --ctrf report.json"
8083
elif [ "$TYPE" = "diff" ]; then
8184
if [ -s ../../../test_dirs.txt ]; then
8285
echo "tests_run=true" >> $GITHUB_ENV
8386
TEST_DIRS=$(cat ../../../test_dirs.txt | xargs)
84-
docker compose exec trinity-node-1 pytest $TEST_DIRS -v -s --ctrf report.json
87+
docker compose exec trinity-node-1 bash -c "source /opt/venv/bin/activate && pytest $TEST_DIRS -v -s --ctrf report.json"
8588
else
8689
echo "No changed modules detected, skipping tests."
8790
echo "tests_run=false" >> $GITHUB_ENV
@@ -90,7 +93,7 @@ jobs:
9093
MODULE="${{ steps.test_type.outputs.module }}"
9194
if [ -n "$MODULE" ]; then
9295
echo "tests_run=true" >> $GITHUB_ENV
93-
docker compose exec trinity-node-1 pytest tests/$MODULE -v -s --ctrf report.json
96+
docker compose exec trinity-node-1 bash -c "source /opt/venv/bin/activate && pytest tests/$MODULE -v -s --ctrf report.json"
9497
else
9598
echo "No module specified, skipping tests."
9699
echo "tests_run=false" >> $GITHUB_ENV

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
rev: 23.7.0
1616
hooks:
1717
- id: black
18-
language_version: python3.10
18+
language_version: python3.12
1919
args: [--line-length=100]
2020

2121
- repo: https://github.com/pycqa/isort

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ Choose one of the following options:
183183
###### Using Conda
184184

185185
```bash
186-
conda create -n trinity python=3.10
186+
conda create -n trinity python=3.12
187187
conda activate trinity
188188

189189
pip install -e ".[dev]"

README_zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ cd Trinity-RFT
182182
#### 使用 Conda
183183

184184
```bash
185-
conda create -n trinity python=3.10
185+
conda create -n trinity python=3.12
186186
conda activate trinity
187187

188188
pip install -e ".[dev]"

docs/sphinx_doc/source/tutorial/trinity_installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Choose one of the following options:
2929
#### Using Conda
3030

3131
```bash
32-
conda create -n trinity python=3.10
32+
conda create -n trinity python=3.12
3333
conda activate trinity
3434

3535
pip install -e ".[dev]"

docs/sphinx_doc/source_zh/tutorial/trinity_installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ cd Trinity-RFT
2929
#### 使用 Conda
3030

3131
```bash
32-
conda create -n trinity python=3.10
32+
conda create -n trinity python=3.12
3333
conda activate trinity
3434

3535
pip install -e ".[dev]"

0 commit comments

Comments
 (0)