Skip to content

Commit 6f5e5bb

Browse files
committed
infra: relaunch frozen staged V121 semantic residual
1 parent e20ec58 commit 6f5e5bb

1 file changed

Lines changed: 138 additions & 0 deletions

File tree

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
name: Trace Ace V121 Frozen Semantic Relaunch
2+
on:
3+
push:
4+
branches: [main]
5+
paths:
6+
- '.github/workflows/trace-ace-v121-relaunch.yml'
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: trace-ace-v121-frozen-relaunch
11+
cancel-in-progress: false
12+
13+
env:
14+
TRANSCRIPT_KEY: trace-ace-transcripts-v1-603547640
15+
TRANSCRIPT_SHA: e685b85b04694e130c25b17d09cdd1892fbda5e9fa685e98b2300114b915aa2d
16+
SCIENCE_REF: agent/v145-v135-plus-evidence-family
17+
18+
jobs:
19+
prepare:
20+
runs-on: ubuntu-24.04
21+
timeout-minutes: 30
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
ref: ${{ env.SCIENCE_REF }}
26+
- uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.12'
29+
cache: pip
30+
- name: Install dependencies
31+
run: python -m pip install --disable-pip-version-check numpy pandas scipy scikit-learn gdown fastembed==0.8.0
32+
- name: Restore frozen transcript archive
33+
uses: actions/cache/restore@v4
34+
with:
35+
path: transcripts.zip
36+
key: ${{ env.TRANSCRIPT_KEY }}
37+
fail-on-cache-miss: true
38+
- name: Validate frozen transcript archive
39+
run: |
40+
set -euo pipefail
41+
test "$(stat -c%s transcripts.zip)" = '603547640'
42+
test "$(sha256sum transcripts.zip | cut -d' ' -f1)" = "$TRANSCRIPT_SHA"
43+
- name: Download frozen metadata and extract
44+
run: |
45+
set -euo pipefail
46+
gdown 1EpqoamY0vFI2qE57R6wdqU5HwuoVk3Zz -O metadata.zip
47+
mkdir -p data/meta data/transcripts
48+
unzip -q metadata.zip -d data/meta
49+
unzip -q transcripts.zip -d data/transcripts
50+
echo "FEATURES=$(find data/meta -type f -name 'train_features*.csv' -print -quit)" >> "$GITHUB_ENV"
51+
echo "LABELS=$(find data/meta -type f -name 'train_labels*.csv' -print -quit)" >> "$GITHUB_ENV"
52+
FIRST=$(find data/transcripts -type f -name '*.csv' -print -quit)
53+
echo "TRANSCRIPTS=$(dirname "$FIRST")" >> "$GITHUB_ENV"
54+
- name: Prepare exact frozen V121 inputs
55+
run: |
56+
python -m py_compile competitions/trace_the_ace/v121_pretrained_semantic_residual.py competitions/trace_the_ace/v121_staged_transport.py
57+
cd competitions/trace_the_ace
58+
python v121_staged_transport.py prepare \
59+
--features "../../$FEATURES" --labels "../../$LABELS" \
60+
--transcripts "../../$TRANSCRIPTS" --rows 2500 --dir ../../v121_prepared
61+
- uses: actions/upload-artifact@v4
62+
with:
63+
name: v121-prepared-relaunch
64+
path: v121_prepared/
65+
retention-days: 2
66+
compression-level: 6
67+
68+
embed:
69+
needs: prepare
70+
strategy:
71+
fail-fast: false
72+
max-parallel: 4
73+
matrix:
74+
shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
75+
runs-on: ubuntu-24.04
76+
timeout-minutes: 25
77+
steps:
78+
- uses: actions/checkout@v4
79+
with:
80+
ref: ${{ env.SCIENCE_REF }}
81+
- uses: actions/setup-python@v5
82+
with:
83+
python-version: '3.12'
84+
cache: pip
85+
- name: Install dependencies
86+
run: python -m pip install --disable-pip-version-check numpy pandas scipy scikit-learn fastembed==0.8.0
87+
- uses: actions/download-artifact@v4
88+
with:
89+
name: v121-prepared-relaunch
90+
path: v121_prepared
91+
- name: Embed exact frozen V121 texts
92+
run: |
93+
cd competitions/trace_the_ace
94+
python v121_staged_transport.py embed --dir ../../v121_prepared \
95+
--shard ${{ matrix.shard }} --shards 16 \
96+
--out ../../v121_embeddings_shard_${{ matrix.shard }}.npz
97+
- uses: actions/upload-artifact@v4
98+
with:
99+
name: v121-relaunch-embeddings-${{ matrix.shard }}
100+
path: v121_embeddings_shard_${{ matrix.shard }}.npz
101+
retention-days: 2
102+
compression-level: 0
103+
104+
evaluate:
105+
needs: embed
106+
runs-on: ubuntu-24.04
107+
timeout-minutes: 30
108+
steps:
109+
- uses: actions/checkout@v4
110+
with:
111+
ref: ${{ env.SCIENCE_REF }}
112+
- uses: actions/setup-python@v5
113+
with:
114+
python-version: '3.12'
115+
cache: pip
116+
- name: Install dependencies
117+
run: python -m pip install --disable-pip-version-check numpy pandas scipy scikit-learn fastembed==0.8.0
118+
- uses: actions/download-artifact@v4
119+
with:
120+
name: v121-prepared-relaunch
121+
path: v121_prepared
122+
- uses: actions/download-artifact@v4
123+
with:
124+
pattern: v121-relaunch-embeddings-*
125+
path: v121_embedding_shards
126+
merge-multiple: false
127+
- name: Evaluate frozen V121 precommit
128+
run: |
129+
cd competitions/trace_the_ace
130+
python v121_staged_transport.py evaluate --dir ../../v121_prepared \
131+
--embeddings ../../v121_embedding_shards --out ../../v121_pretrained_semantic_residual.json
132+
- name: Show decision
133+
run: cat v121_pretrained_semantic_residual.json
134+
- uses: actions/upload-artifact@v4
135+
with:
136+
name: trace-ace-v121-pretrained-semantic-residual-relaunch
137+
path: v121_pretrained_semantic_residual.json
138+
retention-days: 14

0 commit comments

Comments
 (0)