|
| 1 | +name: Finalize MNIST trace-log robustness patch |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - "agent/harden-mnist-trace-log" |
| 7 | + paths: |
| 8 | + - ".github/workflows/harden-mnist-trace-log-final.yml" |
| 9 | + |
| 10 | +permissions: |
| 11 | + contents: write |
| 12 | + |
| 13 | +jobs: |
| 14 | + patch-test-and-publish: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + timeout-minutes: 45 |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v4 |
| 19 | + with: |
| 20 | + ref: agent/harden-mnist-trace-log |
| 21 | + fetch-depth: 0 |
| 22 | + |
| 23 | + - uses: actions/setup-python@v5 |
| 24 | + with: |
| 25 | + python-version: "3.11" |
| 26 | + cache: pip |
| 27 | + cache-dependency-path: | |
| 28 | + baseline/pyproject.toml |
| 29 | + baseline/requirements.txt |
| 30 | +
|
| 31 | + - name: Apply reviewed trace-log patch |
| 32 | + run: python .github/scripts/apply_trace_log_robustness.py |
| 33 | + |
| 34 | + - name: Install complete baseline test environment |
| 35 | + run: | |
| 36 | + python -m pip install --upgrade pip |
| 37 | + python -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu |
| 38 | + python -m pip install -e './baseline[experiment]' |
| 39 | + python -m pip install nbformat |
| 40 | + python -m pip check |
| 41 | +
|
| 42 | + - name: Compile and test baseline suite |
| 43 | + env: |
| 44 | + PYTHONPATH: baseline |
| 45 | + MPLBACKEND: Agg |
| 46 | + run: | |
| 47 | + git diff --check |
| 48 | + python -m compileall -q baseline/rg_baselines baseline/tests |
| 49 | + python -m unittest baseline.tests.test_diagnostics -v |
| 50 | + python -m unittest discover -s baseline/tests -v |
| 51 | +
|
| 52 | + - name: Commit tested patch |
| 53 | + shell: bash |
| 54 | + run: | |
| 55 | + set -euo pipefail |
| 56 | + git config user.name "github-actions[bot]" |
| 57 | + git config user.email \ |
| 58 | + "41898282+github-actions[bot]@users.noreply.github.com" |
| 59 | + git add \ |
| 60 | + baseline/rg_baselines/diagnostics.py \ |
| 61 | + baseline/tests/test_diagnostics.py |
| 62 | + git commit -m "Harden MNIST trace-log diagnostics" |
| 63 | + git push origin HEAD:agent/harden-mnist-trace-log |
0 commit comments