From 9083269d52d445762d99c7ffc846b5a9385e1a0b Mon Sep 17 00:00:00 2001 From: Heath Sanchez <32909488+heathsanchez@users.noreply.github.com> Date: Mon, 24 Aug 2026 12:50:12 +1200 Subject: [PATCH 1/3] infra: add PR launcher for frozen V121 semantic residual --- .../workflows/trace-ace-v121-pr-launch.yml | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 .github/workflows/trace-ace-v121-pr-launch.yml diff --git a/.github/workflows/trace-ace-v121-pr-launch.yml b/.github/workflows/trace-ace-v121-pr-launch.yml new file mode 100644 index 00000000..2dce0e33 --- /dev/null +++ b/.github/workflows/trace-ace-v121-pr-launch.yml @@ -0,0 +1,136 @@ +name: Trace Ace V121 Frozen Semantic PR Launch +on: + pull_request: + branches: [main] + workflow_dispatch: + +concurrency: + group: trace-ace-v121-frozen-pr + cancel-in-progress: false + +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: 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-pr + path: v121_prepared/ + retention-days: 2 + compression-level: 6 + + embed: + needs: prepare + strategy: + fail-fast: false + max-parallel: 4 + matrix: + shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + runs-on: ubuntu-24.04 + timeout-minutes: 25 + 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-pr + path: v121_prepared + - name: Embed exact frozen V121 texts + run: | + cd competitions/trace_the_ace + python v121_staged_transport.py embed --dir ../../v121_prepared \ + --shard ${{ matrix.shard }} --shards 16 \ + --out ../../v121_embeddings_shard_${{ matrix.shard }}.npz + - uses: actions/upload-artifact@v4 + with: + name: v121-pr-embeddings-${{ matrix.shard }} + path: v121_embeddings_shard_${{ matrix.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-pr + path: v121_prepared + - uses: actions/download-artifact@v4 + with: + pattern: v121-pr-embeddings-* + path: v121_embedding_shards + merge-multiple: false + - 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-pr + path: v121_pretrained_semantic_residual.json + retention-days: 14 From 3db98815df53959cce867f37db537f2c85257400 Mon Sep 17 00:00:00 2001 From: Heath Sanchez <32909488+heathsanchez@users.noreply.github.com> Date: Mon, 24 Aug 2026 14:21:07 +1200 Subject: [PATCH 2/3] infra: collapse frozen V121 matrix to one schedulable worker --- .../workflows/trace-ace-v121-pr-launch.yml | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/trace-ace-v121-pr-launch.yml b/.github/workflows/trace-ace-v121-pr-launch.yml index 2dce0e33..608da7c4 100644 --- a/.github/workflows/trace-ace-v121-pr-launch.yml +++ b/.github/workflows/trace-ace-v121-pr-launch.yml @@ -6,7 +6,7 @@ on: concurrency: group: trace-ace-v121-frozen-pr - cancel-in-progress: false + cancel-in-progress: true env: TRANSCRIPT_KEY: trace-ace-transcripts-v1-603547640 @@ -65,13 +65,8 @@ jobs: embed: needs: prepare - strategy: - fail-fast: false - max-parallel: 4 - matrix: - shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] runs-on: ubuntu-24.04 - timeout-minutes: 25 + timeout-minutes: 120 steps: - uses: actions/checkout@v4 with: @@ -86,16 +81,22 @@ jobs: with: name: v121-prepared-pr path: v121_prepared - - name: Embed exact frozen V121 texts + - name: Embed all 16 exact frozen shards sequentially run: | + set -euo pipefail cd competitions/trace_the_ace - python v121_staged_transport.py embed --dir ../../v121_prepared \ - --shard ${{ matrix.shard }} --shards 16 \ - --out ../../v121_embeddings_shard_${{ matrix.shard }}.npz + 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-pr-embeddings-${{ matrix.shard }} - path: v121_embeddings_shard_${{ matrix.shard }}.npz + name: v121-pr-embeddings-all + path: v121_embeddings_shard_*.npz retention-days: 2 compression-level: 0 @@ -119,9 +120,8 @@ jobs: path: v121_prepared - uses: actions/download-artifact@v4 with: - pattern: v121-pr-embeddings-* + name: v121-pr-embeddings-all path: v121_embedding_shards - merge-multiple: false - name: Evaluate frozen V121 precommit run: | cd competitions/trace_the_ace From b3d708c0ddffda037ecfa770e85f67fd07e14551 Mon Sep 17 00:00:00 2001 From: Heath Sanchez <32909488+heathsanchez@users.noreply.github.com> Date: Mon, 24 Aug 2026 14:40:45 +1200 Subject: [PATCH 3/3] infra: cancel stale V121 PR runner queue --- .../workflows/trace-ace-v121-pr-launch.yml | 131 +----------------- 1 file changed, 4 insertions(+), 127 deletions(-) diff --git a/.github/workflows/trace-ace-v121-pr-launch.yml b/.github/workflows/trace-ace-v121-pr-launch.yml index 608da7c4..91d087d9 100644 --- a/.github/workflows/trace-ace-v121-pr-launch.yml +++ b/.github/workflows/trace-ace-v121-pr-launch.yml @@ -1,136 +1,13 @@ -name: Trace Ace V121 Frozen Semantic PR Launch +name: Trace Ace V121 PR Queue Cleanup on: pull_request: branches: [main] - workflow_dispatch: - concurrency: group: trace-ace-v121-frozen-pr 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: + cleanup: + if: ${{ false }} 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 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-pr - 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-pr - 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-pr-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-pr - path: v121_prepared - - uses: actions/download-artifact@v4 - with: - name: v121-pr-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-pr - path: v121_pretrained_semantic_residual.json - retention-days: 14 + - run: echo cleanup