Add Trace the Ace supervision audit #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Trace the Ace mastery experiment | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| run_full: | |
| description: "Run full experiment if TRACE_ACE_DATA_URL secret is configured" | |
| required: false | |
| default: false | |
| type: boolean | |
| limit: | |
| description: "Optional row limit (0 = all rows)" | |
| required: false | |
| default: "0" | |
| type: string | |
| push: | |
| branches: | |
| - agent/trace-ace-mastery-events | |
| paths: | |
| - "competitions/trace_the_ace/**" | |
| - ".github/workflows/trace-ace-mastery.yml" | |
| jobs: | |
| self-test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Install experiment dependencies | |
| run: python -m pip install --disable-pip-version-check numpy pandas scipy scikit-learn | |
| - name: Run mastery extractor self-test | |
| run: python competitions/trace_the_ace/v71_mastery_events.py --self-test | |
| full-experiment: | |
| if: ${{ github.event_name == 'workflow_dispatch' && inputs.run_full }} | |
| needs: self-test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 360 | |
| env: | |
| TRACE_ACE_DATA_URL: ${{ secrets.TRACE_ACE_DATA_URL }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Install experiment dependencies | |
| run: python -m pip install --disable-pip-version-check numpy pandas scipy scikit-learn | |
| - name: Require private dataset URL | |
| shell: bash | |
| run: | | |
| if [ -z "$TRACE_ACE_DATA_URL" ]; then | |
| echo "TRACE_ACE_DATA_URL is not configured; refusing to run without private data transport." | |
| exit 1 | |
| fi | |
| - name: Fetch dataset without logging URL or contents | |
| shell: bash | |
| run: | | |
| set +x | |
| mkdir -p /tmp/trace_ace | |
| curl --fail --silent --show-error --location "$TRACE_ACE_DATA_URL" -o /tmp/trace_ace/data.tar.gz | |
| tar -xzf /tmp/trace_ace/data.tar.gz -C /tmp/trace_ace | |
| rm -f /tmp/trace_ace/data.tar.gz | |
| - name: Locate inputs and run experiment | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| FEATURES=$(find /tmp/trace_ace -type f -name 'train_features*.csv' | head -1) | |
| LABELS=$(find /tmp/trace_ace -type f -name 'train_labels*.csv' | head -1) | |
| TRANSCRIPTS=$(find /tmp/trace_ace -type d -name 'train_transcripts*' | head -1) | |
| test -n "$FEATURES" && test -n "$LABELS" && test -n "$TRANSCRIPTS" | |
| LIMIT="${{ inputs.limit }}" | |
| EXTRA=() | |
| if [ "$LIMIT" != "0" ]; then EXTRA+=(--limit "$LIMIT"); fi | |
| python competitions/trace_the_ace/v71_mastery_events.py \ | |
| --features "$FEATURES" \ | |
| --labels "$LABELS" \ | |
| --transcripts "$TRANSCRIPTS" \ | |
| --out v71_mastery_results.json \ | |
| "${EXTRA[@]}" | |
| - name: Upload aggregate results only | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: v71-mastery-results | |
| path: v71_mastery_results.json | |
| retention-days: 14 |