Repository navigation
78 lines (72 loc) · 3.65 KB
/
Copy pathmiles.yml
File metadata and controls
78 lines (72 loc) · 3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Miles contract
# agent_env.training.miles on Miles itself (tst/miles): Miles' rollout plays rows the writer wrote through its agentic
# generate path, session server, router and mock SGLang server, scores them with the helper's reward hook and groups
# them through its filter, on Miles v0.1.3 and on its main branch. Miles isn't on PyPI: as Miles' own CPU CI does, its
# checkout, SGLang's and Megatron-LM's go on PYTHONPATH, SGLang and Megatron-LM at the commits a release's
# release-lock.json names or at the branches Miles' main tests against, and Miles' requirements and its CPU CI's are
# installed over the dev environment, torch the CPU build. It runs on pull requests that touch the helper, the OpenEnv
# server it plays or the tier, weekly, and on demand; it isn't a required check.
on:
pull_request:
paths:
- "src/agent_env/training/**"
- "src/agent_env/openenv/**"
- "tst/miles/**"
- "tst/unit/training/**"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/miles.yml"
schedule:
- cron: "17 8 * * 1"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: miles-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
PIP_DISABLE_PIP_VERSION_CHECK: "1"
jobs:
rollout:
name: rollout (Miles ${{ matrix.miles }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
miles: ["v0.1.3", "main"]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"
- name: Install from uv.lock with the miles extra
run: |
python -m pip install --quiet -r .github/ci-requirements.txt
uv sync --locked --extra dev --extra miles --python "$(command -v python)"
- name: Check out Miles, SGLang and Megatron-LM
env:
MILES_REF: ${{ matrix.miles }}
run: |
checkout() { git init --quiet "$RUNNER_TEMP/$1" && git -C "$RUNNER_TEMP/$1" fetch --quiet --depth 1 "$2" "$3" \
&& git -C "$RUNNER_TEMP/$1" checkout --quiet FETCH_HEAD && echo "$1 $3 $(git -C "$RUNNER_TEMP/$1" rev-parse HEAD)"; }
checkout miles https://github.com/radixark/miles "$MILES_REF"
sglang=sglang-miles megatron=miles-main
if [ -f "$RUNNER_TEMP/miles/release-lock.json" ]; then
sglang=$(jq -er .sglang_commit "$RUNNER_TEMP/miles/release-lock.json")
megatron=$(jq -er .megatron_commit "$RUNNER_TEMP/miles/release-lock.json")
fi
checkout sglang https://github.com/sgl-project/sglang "$sglang"
checkout Megatron-LM https://github.com/radixark/Megatron-LM "$megatron"
echo "PYTHONPATH=$RUNNER_TEMP/miles:$RUNNER_TEMP/sglang/python:$RUNNER_TEMP/Megatron-LM" >> "$GITHUB_ENV"
- name: Install Miles' requirements and CPU torch
run: |
uv pip install --python .venv/bin/python -r "$RUNNER_TEMP/miles/requirements.txt" \
-r "$RUNNER_TEMP/miles/tests/ci/requirements-ci-cpu.txt" \
--extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match
.venv/bin/python -c "from importlib.metadata import version; print('torch', version('torch'), 'transformers', version('transformers'))"
- name: Miles tier
run: .venv/bin/python -m pytest tst/miles -rA --timeout=900 --junitxml=junit-miles.xml
- name: No skips
if: always()
run: .venv/bin/python .github/scripts/check_skip_policy.py junit-miles.xml