Skip to content

infra: trigger canonical V121 after queue cleanup #15

infra: trigger canonical V121 after queue cleanup

infra: trigger canonical V121 after queue cleanup #15

name: Trace Ace V121 Frozen Semantic Relaunch
on:
push:
branches: [main]
paths:
- '.github/workflows/trace-ace-transcript-cache-seed.yml'
- 'competitions/trace_the_ace/V121_TRIGGER.txt'
workflow_dispatch:
permissions:
contents: write
actions: read
concurrency:
group: trace-ace-v121-frozen-relaunch
cancel-in-progress: true
env:
TRANSCRIPT_KEY: trace-ace-transcripts-v1-603547640
TRANSCRIPT_SHA: e685b85b04694e130c25b17d09cdd1892fbda5e9fa685e98b2300114b915aa2d
SCIENCE_REF: agent/v145-v135-plus-evidence-family
jobs:
prepare:
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.SCIENCE_REF }}
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
- name: Record V121 relaunch start
run: |
python - <<'PY'
import json,os,pathlib
pathlib.Path('/tmp/V121_RELAUNCH_START.json').write_text(json.dumps({'run_id':int(os.environ['GITHUB_RUN_ID']),'status':'STARTED','science_ref':os.environ['SCIENCE_REF']},indent=2))
PY
git fetch origin main
git worktree add /tmp/v121-start origin/main
cd /tmp/v121-start
mkdir -p competitions/trace_the_ace/results
cp /tmp/V121_RELAUNCH_START.json competitions/trace_the_ace/results/V121_RELAUNCH_START.json
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add competitions/trace_the_ace/results/V121_RELAUNCH_START.json
git commit -m "results: record V121 relaunch start $GITHUB_RUN_ID" || true
git push origin HEAD:main || true
- name: Install dependencies
run: python -m pip install --disable-pip-version-check numpy pandas scipy scikit-learn gdown fastembed==0.8.0
- name: Restore frozen transcript archive
uses: actions/cache/restore@v4
with:
path: transcripts.zip
key: ${{ env.TRANSCRIPT_KEY }}
fail-on-cache-miss: true
- name: Validate frozen transcript archive
run: |
set -euo pipefail
test "$(stat -c%s transcripts.zip)" = '603547640'
test "$(sha256sum transcripts.zip | cut -d' ' -f1)" = "$TRANSCRIPT_SHA"
- name: Download frozen metadata and extract
run: |
set -euo pipefail
gdown 1EpqoamY0vFI2qE57R6wdqU5HwuoVk3Zz -O metadata.zip
mkdir -p data/meta data/transcripts
unzip -q metadata.zip -d data/meta
unzip -q transcripts.zip -d data/transcripts
echo "FEATURES=$(find data/meta -type f -name 'train_features*.csv' -print -quit)" >> "$GITHUB_ENV"
echo "LABELS=$(find data/meta -type f -name 'train_labels*.csv' -print -quit)" >> "$GITHUB_ENV"
FIRST=$(find data/transcripts -type f -name '*.csv' -print -quit)
echo "TRANSCRIPTS=$(dirname "$FIRST")" >> "$GITHUB_ENV"
- name: Prepare exact frozen V121 inputs
run: |
python -m py_compile competitions/trace_the_ace/v121_pretrained_semantic_residual.py competitions/trace_the_ace/v121_staged_transport.py
cd competitions/trace_the_ace
python v121_staged_transport.py prepare \
--features "../../$FEATURES" --labels "../../$LABELS" \
--transcripts "../../$TRANSCRIPTS" --rows 2500 --dir ../../v121_prepared
- uses: actions/upload-artifact@v4
with:
name: v121-prepared-relaunch
path: v121_prepared/
retention-days: 2
compression-level: 6
embed:
needs: prepare
runs-on: ubuntu-24.04
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.SCIENCE_REF }}
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
- name: Install dependencies
run: python -m pip install --disable-pip-version-check numpy pandas scipy scikit-learn fastembed==0.8.0
- uses: actions/download-artifact@v4
with:
name: v121-prepared-relaunch
path: v121_prepared
- name: Embed all 16 exact frozen shards sequentially
run: |
set -euo pipefail
cd competitions/trace_the_ace
for shard in $(seq 0 15); do
echo "===== FROZEN V121 SHARD $shard / 15 ====="
python v121_staged_transport.py embed --dir ../../v121_prepared \
--shard "$shard" --shards 16 \
--out "../../v121_embeddings_shard_${shard}.npz"
done
cd ../..
test "$(find . -maxdepth 1 -name 'v121_embeddings_shard_*.npz' | wc -l)" -eq 16
- uses: actions/upload-artifact@v4
with:
name: v121-relaunch-embeddings-all
path: v121_embeddings_shard_*.npz
retention-days: 2
compression-level: 0
evaluate:
needs: embed
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.SCIENCE_REF }}
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
- name: Install dependencies
run: python -m pip install --disable-pip-version-check numpy pandas scipy scikit-learn fastembed==0.8.0
- uses: actions/download-artifact@v4
with:
name: v121-prepared-relaunch
path: v121_prepared
- uses: actions/download-artifact@v4
with:
name: v121-relaunch-embeddings-all
path: v121_embedding_shards
- name: Evaluate frozen V121 precommit
run: |
cd competitions/trace_the_ace
python v121_staged_transport.py evaluate --dir ../../v121_prepared \
--embeddings ../../v121_embedding_shards --out ../../v121_pretrained_semantic_residual.json
- name: Show decision
run: cat v121_pretrained_semantic_residual.json
- uses: actions/upload-artifact@v4
with:
name: trace-ace-v121-pretrained-semantic-residual-relaunch
path: v121_pretrained_semantic_residual.json
retention-days: 14
- name: Record V121 relaunch completion
if: always()
run: |
python - <<'PY'
import json,os,pathlib
p=pathlib.Path('v121_pretrained_semantic_residual.json')
out={'run_id':int(os.environ['GITHUB_RUN_ID']),'status':'FINAL','result_exists':p.exists()}
if p.exists():
r=json.loads(p.read_text()); out['verdict']=r.get('decision',{}).get('verdict'); out['objective_gain']=r.get('objective_grouped',{}).get('semantic',{}).get('gain'); out['session_gain']=r.get('session_grouped',{}).get('semantic',{}).get('gain')
pathlib.Path('/tmp/V121_RELAUNCH_FINAL.json').write_text(json.dumps(out,indent=2)); print(json.dumps(out,indent=2))
PY
git fetch origin main
git worktree add /tmp/v121-final origin/main
cd /tmp/v121-final
mkdir -p competitions/trace_the_ace/results
cp /tmp/V121_RELAUNCH_FINAL.json competitions/trace_the_ace/results/V121_RELAUNCH_FINAL.json
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add competitions/trace_the_ace/results/V121_RELAUNCH_FINAL.json
git commit -m "results: record V121 relaunch final $GITHUB_RUN_ID" || true
git push origin HEAD:main || true