TEMP: record invariant references on CI #1
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: Record invariant references | |
| # TEMPORARY: recording helper. Push the `record-invariant-refs` branch to re-record the canonical | |
| # reference trajectories on the CI hardware, then download the `invariant-references` artifact and | |
| # commit it. Delete this file once the references are in. | |
| on: | |
| push: | |
| branches: [record-invariant-refs] | |
| env: | |
| TQDM_DISABLE: 1 | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| PYTORCH_CUDA_ALLOC_CONF: "expandable_segments:True" | |
| PYTORCH_ALLOC_CONF: "expandable_segments:True" | |
| jobs: | |
| record: | |
| name: Record invariant references | |
| runs-on: | |
| group: aws-g5-12xlarge-cache # must match the runner the invariant tests run on | |
| container: | |
| image: pytorch/pytorch:2.8.0-cuda12.8-cudnn9-devel | |
| options: --gpus all --shm-size "16gb" | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Git checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: '3.12' | |
| - name: Install Make and Git | |
| run: | | |
| apt-get update && apt-get install -y make git curl | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| - name: Create Python virtual environment | |
| run: | | |
| uv venv | |
| uv pip install --upgrade setuptools wheel | |
| - name: Install dependencies | |
| run: | | |
| source .venv/bin/activate | |
| uv pip install ".[dev]" | |
| - name: Record the canonical trajectories | |
| run: | | |
| source .venv/bin/activate | |
| git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| python tests/invariant/test_invariant.py | |
| - name: Upload the recorded references | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: invariant-references | |
| path: tests/invariant/references/ |