|
1 | | -name: Trace Ace Transcript Cache Seed and V123 |
2 | | -# Explicit run trigger: 2026-08-19 execution requested. |
3 | | - |
| 1 | +name: Trace Ace V141 Runtime Asset Build |
4 | 2 | on: |
5 | 3 | push: |
6 | 4 | branches: [main] |
7 | 5 | paths: |
8 | 6 | - '.github/workflows/trace-ace-transcript-cache-seed.yml' |
9 | 7 | workflow_dispatch: |
10 | | - |
11 | 8 | permissions: |
12 | 9 | contents: write |
13 | 10 | actions: read |
14 | | - |
15 | | -concurrency: |
16 | | - group: trace-ace-frozen-transcripts-v1 |
17 | | - cancel-in-progress: false |
18 | | - |
19 | 11 | jobs: |
20 | | - seed-and-v123: |
| 12 | + build-v141: |
21 | 13 | runs-on: ubuntu-24.04 |
22 | | - timeout-minutes: 20 |
| 14 | + timeout-minutes: 120 |
23 | 15 | steps: |
24 | | - - name: Check out frozen V123 experiment branch |
| 16 | + - name: Check out frozen V141 branch |
25 | 17 | uses: actions/checkout@v4 |
26 | 18 | with: |
27 | | - ref: agent/v123-cache-seeded-rerun |
28 | | - |
| 19 | + ref: agent/v141-v135-runtime-assets |
| 20 | + - name: Record authoritative V141 run start |
| 21 | + shell: bash |
| 22 | + run: | |
| 23 | + set -euo pipefail |
| 24 | + python - <<'PY' |
| 25 | + import json, os, pathlib |
| 26 | + out={'run_id':int(os.environ['GITHUB_RUN_ID']),'run_attempt':int(os.environ['GITHUB_RUN_ATTEMPT']),'workflow':os.environ['GITHUB_WORKFLOW'],'status':'STARTED'} |
| 27 | + pathlib.Path('/tmp/V141_RUN_START.json').write_text(json.dumps(out,indent=2)) |
| 28 | + print(json.dumps(out,indent=2)) |
| 29 | + PY |
| 30 | + git fetch origin main |
| 31 | + git worktree add /tmp/v141-start origin/main |
| 32 | + cd /tmp/v141-start |
| 33 | + mkdir -p competitions/trace_the_ace/results |
| 34 | + cp /tmp/V141_RUN_START.json competitions/trace_the_ace/results/V141_RUN_START.json |
| 35 | + git config user.name github-actions[bot] |
| 36 | + git config user.email 41898282+github-actions[bot]@users.noreply.github.com |
| 37 | + git add competitions/trace_the_ace/results/V141_RUN_START.json |
| 38 | + git commit -m "results: record V141 run start $GITHUB_RUN_ID" |
| 39 | + git push origin HEAD:main |
29 | 40 | - uses: actions/setup-python@v5 |
30 | 41 | with: |
31 | 42 | python-version: '3.12' |
32 | 43 | cache: pip |
33 | | - |
34 | 44 | - name: Install dependencies |
35 | 45 | run: python -m pip install --disable-pip-version-check numpy pandas scipy scikit-learn gdown |
36 | | - |
37 | | - - name: Restore frozen transcript archive from GitHub cache |
38 | | - id: transcript-cache |
39 | | - uses: actions/cache/restore@v4 |
| 46 | + - name: Restore transcript cache |
| 47 | + id: tc |
| 48 | + uses: actions/cache@v4 |
40 | 49 | with: |
41 | 50 | path: transcripts.zip |
42 | 51 | key: trace-ace-transcripts-v1-603547640 |
43 | | - |
44 | | - - name: Download frozen transcript archive on cache miss |
45 | | - if: steps.transcript-cache.outputs.cache-hit != 'true' |
46 | | - shell: bash |
47 | | - run: | |
48 | | - set -euo pipefail |
49 | | - for id in \ |
50 | | - 1nOjremWhpZ_QKSLvZfGcNkS_C3kMMBUI \ |
51 | | - 1vkgFdcw-rnlueCgGsKKbUUXql8GyGmET |
52 | | - do |
53 | | - rm -f transcripts.zip |
54 | | - echo "Trying frozen transcript source $id" |
55 | | - if gdown "$id" -O transcripts.zip; then |
56 | | - bytes=$(stat -c%s transcripts.zip) |
57 | | - echo "Downloaded $bytes bytes" |
58 | | - if [ "$bytes" = "603547640" ]; then |
59 | | - echo "Frozen transcript archive size verified" |
60 | | - echo "TRANSCRIPT_SOURCE_ID=$id" >> "$GITHUB_ENV" |
61 | | - break |
62 | | - fi |
63 | | - echo "Unexpected transcript archive size: $bytes" >&2 |
64 | | - fi |
65 | | - rm -f transcripts.zip |
66 | | - done |
67 | | - test -f transcripts.zip |
68 | | - test "$(stat -c%s transcripts.zip)" = "603547640" |
69 | | - unzip -tq transcripts.zip >/dev/null |
70 | | - echo "Frozen transcript archive ZIP integrity verified" |
71 | | -
|
72 | | - - name: Validate restored/downloaded archive and record digest |
73 | | - shell: bash |
| 52 | + - name: Verify frozen transcript cache |
74 | 53 | run: | |
75 | 54 | set -euo pipefail |
76 | | - test -f transcripts.zip |
77 | | - test "$(stat -c%s transcripts.zip)" = "603547640" |
| 55 | + test '${{ steps.tc.outputs.cache-hit }}' = 'true' |
| 56 | + test "$(stat -c%s transcripts.zip)" = '603547640' |
| 57 | + echo 'e685b85b04694e130c25b17d09cdd1892fbda5e9fa685e98b2300114b915aa2d transcripts.zip' | sha256sum -c - |
78 | 58 | unzip -tq transcripts.zip >/dev/null |
79 | | - sha256sum transcripts.zip | tee transcript_sha256.txt |
80 | | - echo "TRANSCRIPT_SHA256=$(cut -d' ' -f1 transcript_sha256.txt)" >> "$GITHUB_ENV" |
81 | | - echo "TRANSCRIPT_BYTES=$(stat -c%s transcripts.zip)" >> "$GITHUB_ENV" |
82 | | - if [ "${{ steps.transcript-cache.outputs.cache-hit }}" = "true" ]; then |
83 | | - echo "TRANSCRIPT_SOURCE_ID=GITHUB_CACHE" >> "$GITHUB_ENV" |
84 | | - fi |
85 | | -
|
86 | | - - name: Save frozen transcript archive to GitHub cache |
87 | | - id: transcript-cache-save |
88 | | - if: steps.transcript-cache.outputs.cache-hit != 'true' |
89 | | - uses: actions/cache/save@v4 |
90 | | - with: |
91 | | - path: transcripts.zip |
92 | | - key: trace-ace-transcripts-v1-603547640 |
93 | | - |
94 | | - - name: Download metadata and extract frozen data |
95 | | - shell: bash |
| 59 | + - name: Restore metadata |
96 | 60 | run: | |
97 | 61 | set -euo pipefail |
98 | 62 | gdown 1EpqoamY0vFI2qE57R6wdqU5HwuoVk3Zz -O metadata.zip |
99 | | - mkdir -p data/meta data/transcripts |
100 | | - unzip -q metadata.zip -d data/meta |
| 63 | + mkdir -p data/transcripts data/meta |
101 | 64 | unzip -q transcripts.zip -d data/transcripts |
| 65 | + unzip -q metadata.zip -d data/meta |
102 | 66 | echo "FEATURES=$(find data/meta -type f -name 'train_features*.csv' -print -quit)" >> "$GITHUB_ENV" |
103 | 67 | echo "LABELS=$(find data/meta -type f -name 'train_labels*.csv' -print -quit)" >> "$GITHUB_ENV" |
104 | 68 | FIRST=$(find data/transcripts -type f -name '*.csv' -print -quit) |
105 | 69 | test -n "$FIRST" |
106 | 70 | echo "TRANSCRIPTS=$(dirname "$FIRST")" >> "$GITHUB_ENV" |
107 | | -
|
108 | | - - name: Preflight frozen V123 |
109 | | - run: python -m py_compile competitions/trace_the_ace/v123_official_reference_scalars.py |
110 | | - |
111 | | - - name: Run frozen V123 |
112 | | - run: python competitions/trace_the_ace/v123_official_reference_scalars.py --features "$FEATURES" --labels "$LABELS" --transcripts "$TRANSCRIPTS" --rows 2500 --out v123_official_reference_scalars.json |
113 | | - |
114 | | - - name: Show V123 decision |
115 | | - if: always() |
116 | | - run: test -f v123_official_reference_scalars.json && cat v123_official_reference_scalars.json || true |
117 | | - |
118 | | - - name: Record authoritative run metadata |
119 | | - if: always() |
120 | | - env: |
121 | | - GH_TOKEN: ${{ github.token }} |
122 | | - shell: bash |
| 71 | + - name: Build frozen V135 runtime assets |
123 | 72 | run: | |
124 | | - set -euo pipefail |
125 | | - JOB_ID=$(python - <<'PY' |
126 | | - import json, os, urllib.request |
127 | | - req=urllib.request.Request( |
128 | | - f"https://api.github.com/repos/{os.environ['GITHUB_REPOSITORY']}/actions/runs/{os.environ['GITHUB_RUN_ID']}/jobs", |
129 | | - headers={"Authorization": f"Bearer {os.environ['GH_TOKEN']}", "Accept":"application/vnd.github+json"}) |
130 | | - with urllib.request.urlopen(req) as r: |
131 | | - data=json.load(r) |
132 | | - print(data['jobs'][0]['id']) |
133 | | - PY |
134 | | - ) |
135 | | - CACHE_HIT='${{ steps.transcript-cache.outputs.cache-hit }}' |
136 | | - CACHE_SAVE='${{ steps.transcript-cache-save.outcome }}' |
137 | | - python - <<PY |
138 | | - import json, os, pathlib |
139 | | - v={} |
140 | | - p=pathlib.Path('v123_official_reference_scalars.json') |
141 | | - if p.exists(): v=json.loads(p.read_text()) |
142 | | - out={ |
143 | | - 'run_id': int(os.environ['GITHUB_RUN_ID']), |
144 | | - 'job_id': int('$JOB_ID'), |
145 | | - 'run_attempt': int(os.environ['GITHUB_RUN_ATTEMPT']), |
146 | | - 'cache_key': 'trace-ace-transcripts-v1-603547640', |
147 | | - 'cache_hit': '$CACHE_HIT', |
148 | | - 'cache_save_outcome': '$CACHE_SAVE', |
149 | | - 'source_id': os.environ.get('TRANSCRIPT_SOURCE_ID','UNKNOWN'), |
150 | | - 'archive_bytes': int(os.environ.get('TRANSCRIPT_BYTES','0')), |
151 | | - 'archive_sha256': os.environ.get('TRANSCRIPT_SHA256','UNKNOWN'), |
152 | | - 'validation': 'exact size 603547640 + unzip integrity; SHA256 recorded, no historical expected digest precommitted', |
153 | | - 'v123': v, |
154 | | - } |
155 | | - pathlib.Path('/tmp/trace_ace_v123_run_status.json').write_text(json.dumps(out,indent=2)) |
156 | | - print(json.dumps(out,indent=2)) |
157 | | - PY |
158 | | - git fetch origin main |
159 | | - git worktree add /tmp/status-main origin/main |
160 | | - cd /tmp/status-main |
161 | | - mkdir -p competitions/trace_the_ace/results |
162 | | - cp /tmp/trace_ace_v123_run_status.json competitions/trace_the_ace/results/V123_LATEST_RUN_STATUS.json |
163 | | - git config user.name github-actions[bot] |
164 | | - git config user.email 41898282+github-actions[bot]@users.noreply.github.com |
165 | | - git add competitions/trace_the_ace/results/V123_LATEST_RUN_STATUS.json |
166 | | - git commit -m "results: record V123 run $GITHUB_RUN_ID" || true |
167 | | - git push origin HEAD:main |
| 73 | + cd competitions/trace_the_ace |
| 74 | + python train_v135_runtime_assets.py --features "../../$FEATURES" --labels "../../$LABELS" --transcripts "../../$TRANSCRIPTS" --out ../../v135_runtime_assets |
| 75 | + - name: Upload V141 assets |
| 76 | + uses: actions/upload-artifact@v4 |
| 77 | + with: |
| 78 | + name: trace-ace-v141-v135-runtime-assets |
| 79 | + path: v135_runtime_assets |
| 80 | + retention-days: 14 |
0 commit comments