Skip to content

Commit a8ea91e

Browse files
authored
Make skyrl-tx CI run against skyrl directory (#1087)
This is getting the CI to work after moving the files in #1068 <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/novasky-ai/skyrl/pull/1087" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end -->
1 parent 8a02ab1 commit a8ea91e

36 files changed

+3223
-0
lines changed

.github/workflows/cpu_skyrl.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: SkyRL-CPU
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'skyrl/**'
8+
- '.github/workflows/cpu_skyrl.yaml'
9+
pull_request:
10+
paths:
11+
- 'skyrl/**'
12+
- '.github/workflows/cpu_skyrl.yaml'
13+
workflow_dispatch:
14+
15+
permissions:
16+
checks: write # for status checks to appear
17+
contents: read
18+
19+
# Cancel runs for previous commits on the same branch
20+
concurrency:
21+
group: skyrl-${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
skyrl_tests:
26+
runs-on: ubuntu-latest
27+
defaults:
28+
run:
29+
shell: bash
30+
working-directory: ./skyrl
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Install uv
34+
run: |
35+
curl -LsSf https://astral.sh/uv/install.sh | sh
36+
- name: Run lint
37+
run: |
38+
uvx ruff check
39+
- name: Run pytest
40+
run: |
41+
uv run --extra tinker --extra jax --extra dev pytest --forked -s tests --ignore=tests/tx/gpu
42+
- name: Run a single training step
43+
run: |
44+
uv run skyrl train --model pcmoritz/qwen3-tiny-test --dataset mahiatlinux/TinyStories-GPT4-V2-50K-SUBSET --output-dir /tmp --batch-size 2 --max-steps 1 --optimizer-args '{"learning_rate": 0.002, "weight_decay": 0.1}'
45+
uv run skyrl train --model pcmoritz/qwen3-tiny-test --dataset mahiatlinux/TinyStories-GPT4-V2-50K-SUBSET --output-dir /tmp --batch-size 2 --max-steps 1 --optimizer-args '{"learning_rate": 0.002, "weight_decay": 0.1}' --tp-size 2
46+
- name: Test experiment tracker integration
47+
run: |
48+
WANDB_MODE=offline WANDB_API_KEY=dummy uv run --with wandb skyrl train --model pcmoritz/qwen3-tiny-test --dataset mahiatlinux/TinyStories-GPT4-V2-50K-SUBSET --output-dir /tmp --batch-size 2 --max-steps 1 --tracker wandb --tracker-args '{"name": "Qwen3-8B", "project": "skyrl"}'
49+
- name: Run engine benchmarks
50+
run: |
51+
uv run --extra tinker --extra dev python benchmarks/benchmark_engine.py --base-model trl-internal-testing/tiny-Qwen3ForCausalLM --backend-config '{"max_lora_adapters": 3, "max_lora_rank": 1}' --num-warmup-steps 1 --num-steps 1 --num-requests 1 --seq-len 8 --sample-max-tokens 16

.github/workflows/gpu_skyrl.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: SkyRL-GPU
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'skyrl/**'
8+
- '.github/workflows/gpu_skyrl.yaml'
9+
pull_request:
10+
paths:
11+
- 'skyrl/**'
12+
- '.github/workflows/gpu_skyrl.yaml'
13+
workflow_dispatch:
14+
15+
permissions:
16+
checks: write
17+
contents: read
18+
19+
concurrency:
20+
group: skyrl-gpu-${{ github.workflow }}-${{ github.ref }}
21+
cancel-in-progress: true
22+
23+
jobs:
24+
skyrl_gpu_tests:
25+
runs-on: ubuntu-latest
26+
defaults:
27+
run:
28+
shell: bash
29+
working-directory: ./skyrl
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Set up Python
34+
uses: actions/setup-python@v5
35+
with:
36+
python-version: '3.12'
37+
cache: 'pip'
38+
- name: Install the latest version of uv
39+
uses: astral-sh/setup-uv@v6
40+
with:
41+
activate-environment: true
42+
- name: Install dependencies
43+
run: uv pip install anyscale==0.24.79 typer==0.9.0
44+
- name: GPU tests
45+
env:
46+
ANYSCALE_CLI_TOKEN: ${{ secrets.ANYSCALE_CLI_TOKEN }}
47+
ANYSCALE_HOST: https://console.anyscale.com
48+
run: |
49+
anyscale job submit -f ci/anyscale_gpu_ci.yaml --timeout 10000
50+
anyscale job wait --cloud sky-anyscale-aws-us-east-1 --name skyrl-tx-gpu-ci --timeout 10000

skyrl/ci/anyscale_gpu_ci.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: skyrl-tx-gpu-ci
2+
entrypoint: bash ci/gpu_ci_run.sh
3+
image_uri: novaskyai/skyrl-train-ray-2.51.1-py3.12-cu12.8
4+
cloud: sky-anyscale-aws-us-east-1
5+
ray_version: "2.51.1"
6+
compute_config: l4_ci
7+
working_dir: .
8+
max_retries: 0

skyrl/ci/gpu_ci_run.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
set -xeuo pipefail
3+
4+
export CI=true
5+
6+
# Run GPU-specific tests
7+
uv run --extra gpu --extra tinker --extra dev pytest tests/tx/gpu

skyrl/tests/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SkyRL tx: Tests
2+
3+
## Run all tests
4+
uv run --extra dev --extra tinker pytest -v
5+
6+
## Run Specific tests
7+
uv run --extra dev --extra tinker pytest -v -s tests/models/test_qwen3_generate.py::test_qwen3_generate_speed

skyrl/tests/__init__.py

Whitespace-only changes.

skyrl/tests/backends/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)