Skip to content

Run memory-safe frozen V121 semantic residual #12

Run memory-safe frozen V121 semantic residual

Run memory-safe frozen V121 semantic residual #12

name: Trace Ace V121 Pretrained Semantic Residual
on:
pull_request:
branches: [agent/trace-ace-mastery-events, agent/v111-runner]
paths:
- 'competitions/trace_the_ace/v121_pretrained_semantic_residual.py'
- 'competitions/trace_the_ace/v121_staged_transport.py'
- '.github/workflows/trace-ace-v121-pretrained-semantic-residual.yml'
workflow_dispatch:
# Infrastructure-only serialization. Scientific protocol is unchanged.
concurrency:
group: trace-ace-frozen-transcripts-v1
cancel-in-progress: false
env:
TRANSCRIPT_KEY: trace-ace-transcripts-v1-603547640
TRANSCRIPT_SHA: e685b85b04694e130c25b17d09cdd1892fbda5e9fa685e98b2300114b915aa2d
jobs:
prepare:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- 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 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
shell: bash
run: |
set -euo pipefail
test "$(stat -c%s transcripts.zip)" = "603547640"
unzip -tq transcripts.zip >/dev/null
test "$(sha256sum transcripts.zip | cut -d' ' -f1)" = "$TRANSCRIPT_SHA"
- name: Download frozen metadata and extract
shell: bash
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
path: v121_prepared/
retention-days: 2
compression-level: 6
embed:
needs: prepare
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- 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
path: v121_prepared
- name: Embed exact frozen V121 texts
run: |
cd competitions/trace_the_ace
python v121_staged_transport.py embed --dir ../../v121_prepared --out ../../v121_embeddings.npz
- uses: actions/upload-artifact@v4
with:
name: v121-embeddings
path: v121_embeddings.npz
retention-days: 2
compression-level: 0
evaluate:
needs: embed
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- 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
path: v121_prepared
- uses: actions/download-artifact@v4
with:
name: v121-embeddings
path: .
- name: Evaluate frozen V121 precommit
run: |
cd competitions/trace_the_ace
python v121_staged_transport.py evaluate --dir ../../v121_prepared \
--embeddings ../../v121_embeddings.npz --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
path: v121_pretrained_semantic_residual.json
retention-days: 14