Skip to content

Commit 6e3196f

Browse files
committed
trace-ace: simplify V144 validator and relaunch
1 parent 357ecc1 commit 6e3196f

1 file changed

Lines changed: 5 additions & 15 deletions

File tree

.github/workflows/trace-ace-transcript-cache-seed.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ jobs:
3535
env: {GH_TOKEN: '${{ github.token }}'}
3636
run: |
3737
set -euo pipefail
38-
curl -L --fail -H "Authorization: Bearer $GH_TOKEN" -H 'Accept: application/vnd.github+json' \
39-
https://api.github.com/repos/heathsanchez/mathgraph/actions/artifacts/9490954282/zip -o v142_artifact.zip
38+
curl -L --fail -H "Authorization: Bearer $GH_TOKEN" -H 'Accept: application/vnd.github+json' https://api.github.com/repos/heathsanchez/mathgraph/actions/artifacts/9490954282/zip -o v142_artifact.zip
4039
mkdir -p /tmp/v142_art /tmp/v135_base
4140
unzip -q v142_artifact.zip -d /tmp/v142_art
4241
test -f /tmp/v142_art/trace_ace_v135_submission.zip
@@ -48,7 +47,6 @@ jobs:
4847
set -euo pipefail
4948
python competitions/trace_the_ace/v144_build_smoke_probes.py --baseline /tmp/v135_base --out v144_probes
5049
for z in v144_probes/*.zip; do
51-
echo "=== $z ==="
5250
unzip -Z1 "$z" | grep -qx 'main.py'
5351
sha256sum "$z"
5452
done
@@ -82,18 +80,10 @@ jobs:
8280
tutoringoutcomeschallengeprodacr.azurecr.io/tutoring-outcomes-runtime:gpu-latest
8381
test -f official/submission/submission.csv
8482
test -f official/submission/log.txt
85-
python - "$tag" <<'PY'
86-
import csv,sys,math,json,pathlib
87-
tag=sys.argv[1]
88-
with open('official/data-demo/submission_format.csv',newline='') as f: fmt=list(csv.DictReader(f))
89-
with open('official/submission/submission.csv',newline='') as f:
90-
r=csv.DictReader(f); assert r.fieldnames==['response_id','probability']; out=list(r)
91-
assert len(out)==len(fmt)
92-
assert [x['response_id'] for x in out]==[x['response_id'] for x in fmt]
93-
p=[float(x['probability']) for x in out]
94-
assert all(math.isfinite(x) and 0<=x<=1 for x in p)
95-
pathlib.Path('v144_evidence',tag+'.json').write_text(json.dumps({'tag':tag,'rows':len(out),'p_min':min(p),'p_max':max(p),'p_mean':sum(p)/len(p)},indent=2))
96-
PY
83+
python competitions/trace_the_ace/v144_validate_submission.py \
84+
--format official/data-demo/submission_format.csv \
85+
--submission official/submission/submission.csv \
86+
--tag "$tag" --out "v144_evidence/${tag}.json"
9787
cp official/submission/log.txt "v144_evidence/${tag}.log"
9888
done
9989
- uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)