Skip to content

Commit 45dd77f

Browse files
committed
trace ace: launch V82 supervised ModernBERT objective-cold probe [run-v82]
1 parent faf9261 commit 45dd77f

1 file changed

Lines changed: 76 additions & 0 deletions

File tree

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Trace the Ace V82 supervised ModernBERT
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- agent/trace-ace-mastery-events
8+
paths:
9+
- "competitions/trace_the_ace/v82_modernbert_supervised.py"
10+
- ".github/workflows/trace-ace-v82-modernbert.yml"
11+
12+
jobs:
13+
v82:
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 360
16+
env:
17+
TRACE_ACE_TRANSCRIPTS_DRIVE_FILE_ID: 1nOjremWhpZ_QKSLvZfGcNkS_C3kMMBUI
18+
TRACE_ACE_METADATA_DRIVE_FILE_ID: 1EpqoamY0vFI2qE57R6wdqU5HwuoVk3Zz
19+
TOKENIZERS_PARALLELISM: "false"
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.12"
25+
cache: pip
26+
- name: Install dependencies
27+
run: python -m pip install --disable-pip-version-check numpy pandas scipy scikit-learn gdown torch transformers accelerate
28+
- name: Download data
29+
shell: bash
30+
run: |
31+
set -euo pipefail
32+
mkdir -p /tmp/trace_ace/transcripts /tmp/trace_ace/meta
33+
python - <<'PY'
34+
import os, gdown
35+
assert gdown.download(id=os.environ['TRACE_ACE_TRANSCRIPTS_DRIVE_FILE_ID'], output='/tmp/trace_ace/transcripts.zip', quiet=False)
36+
assert gdown.download(id=os.environ['TRACE_ACE_METADATA_DRIVE_FILE_ID'], output='/tmp/trace_ace/meta.zip', quiet=False)
37+
PY
38+
unzip -q /tmp/trace_ace/transcripts.zip -d /tmp/trace_ace/transcripts
39+
unzip -q /tmp/trace_ace/meta.zip -d /tmp/trace_ace/meta
40+
- name: Resolve schemas and run V82
41+
shell: bash
42+
run: |
43+
set -euo pipefail
44+
python - <<'PY'
45+
import csv, shlex
46+
from pathlib import Path
47+
roots=[Path('/tmp/trace_ace/meta'),Path('/tmp/trace_ace/transcripts')]
48+
f=l=t=None
49+
for root in roots:
50+
for p in root.rglob('*.csv'):
51+
try:
52+
with p.open('r',encoding='utf-8-sig',errors='ignore',newline='') as h: cols=next(csv.reader(h))
53+
except Exception: continue
54+
s=set(cols)
55+
if f is None and {'response_id','session_id','learning_objective'}.issubset(s): f=p
56+
if l is None and 'response_id' in s and ('is_correct' in s or 'correct' in s): l=p
57+
if t is None and {'session_id','utterance_id','role','content','timestamp'}.issubset(s): t=p.parent
58+
if not (f and l and t): raise SystemExit('Could not identify inputs')
59+
print('FEATURE HEADER', list(csv.reader(open(f,encoding='utf-8-sig')))[0])
60+
print('LABEL HEADER', list(csv.reader(open(l,encoding='utf-8-sig')))[0])
61+
with open('/tmp/trace_ace/paths.env','w') as h:
62+
h.write('FEATURES='+shlex.quote(str(f))+'\nLABELS='+shlex.quote(str(l))+'\nTRANSCRIPTS='+shlex.quote(str(t))+'\n')
63+
PY
64+
source /tmp/trace_ace/paths.env
65+
python competitions/trace_the_ace/v82_modernbert_supervised.py \
66+
--features "$FEATURES" --labels "$LABELS" --transcripts "$TRANSCRIPTS" \
67+
--out v82_modernbert_supervised.json \
68+
--model answerdotai/ModernBERT-large \
69+
--folds 1 --epochs 1 --top-blocks 2 --max-len 768 --batch 2 --eval-batch 4
70+
- name: Upload aggregate result
71+
if: always()
72+
uses: actions/upload-artifact@v4
73+
with:
74+
name: trace-ace-v82-modernbert-supervised
75+
path: v82_modernbert_supervised.json
76+
retention-days: 14

0 commit comments

Comments
 (0)