Repository navigation
65 lines (59 loc) · 2.6 KB
/
Copy pathtinker.yml
File metadata and controls
65 lines (59 loc) · 2.6 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
name: Tinker contract
# The Tinker helper's episodes on tinker-cookbook itself (tst/tinker): EpisodeEnv played as the cookbook's rollouts step
# a MessageEnv, on the Episode API's fake steps with a stand-in renderer, so nothing samples and no Tinker key is needed,
# on tinker-cookbook as released and on its main branch. tinker-cookbook and CPU torch are installed over the dev
# environment. It runs on pull requests that touch the helper, the Episode API or the tier, weekly, and on demand; it
# isn't a required check.
on:
pull_request:
paths:
- "src/agent_env/training/**"
- "src/agent_env/task/episode/**"
- "src/agent_env/openenv/reward.py"
- "tst/tinker/**"
- "tst/unit/training/**"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/tinker.yml"
schedule:
- cron: "17 8 * * 1"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: tinker-${{ 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:
episodes:
name: episodes (tinker-cookbook ${{ matrix.cookbook }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- cookbook: "released"
requirement: "tinker-cookbook"
- cookbook: "main"
requirement: "tinker-cookbook@git+https://github.com/thinking-machines-lab/tinker-cookbook@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 tinker extra
run: |
python -m pip install --quiet -r .github/ci-requirements.txt
uv sync --locked --extra dev --extra tinker --python "$(command -v python)"
- name: Install tinker-cookbook and CPU torch
run: |
uv pip install --python .venv/bin/python ${{ matrix.requirement }} torch \
--extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match
.venv/bin/python -c "from importlib.metadata import version; print('tinker-cookbook', version('tinker-cookbook'), 'tinker', version('tinker'), 'torch', version('torch'))"
- name: Tinker tier
run: .venv/bin/python -m pytest tst/tinker -rA --timeout=900 --junitxml=junit-tinker.xml
- name: No skips
if: always()
run: .venv/bin/python .github/scripts/check_skip_policy.py junit-tinker.xml