Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 54 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- "examples/**"
- "docs/**"
- "README.md"
- "benchmarks/**"
- ".github/workflows/**"
- "pyproject.toml"
- "uv.lock"
Expand All @@ -32,6 +33,7 @@ jobs:
notebooks: ${{ steps.filter.outputs.notebooks }}
docs: ${{ steps.filter.outputs.docs }}
workflow: ${{ steps.filter.outputs.workflow }}
benchmark: ${{ steps.filter.outputs.benchmark }}
steps:
- uses: actions/checkout@v7
with:
Expand Down Expand Up @@ -101,12 +103,19 @@ jobs:
notebooks = hit("examples/", "src/", "pyproject.toml", "uv.lock")
docs = hit("docs/", "README.md", "src/", "pyproject.toml")
workflow = hit(".github/workflows/ci.yml")
benchmark = hit(
"benchmarks/",
"src/koopman_graph/benchmark/",
"src/koopman_graph/cli/",
"tests/benchmark/",
)

emit("lint", lint)
emit("test", test)
emit("notebooks", notebooks)
emit("docs", docs)
emit("workflow", workflow)
emit("benchmark", benchmark)
PY

lint:
Expand All @@ -117,7 +126,7 @@ jobs:
- uses: actions/checkout@v7

- name: Install uv
uses: astral-sh/setup-uv@v9.0.0
uses: astral-sh/setup-uv@v10.0.1
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
Expand Down Expand Up @@ -149,7 +158,7 @@ jobs:
- uses: actions/checkout@v7

- name: Install uv
uses: astral-sh/setup-uv@v9.0.0
uses: astral-sh/setup-uv@v10.0.1
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
Expand Down Expand Up @@ -210,7 +219,7 @@ jobs:
- uses: actions/checkout@v7

- name: Install uv
uses: astral-sh/setup-uv@v9.0.0
uses: astral-sh/setup-uv@v10.0.1
with:
python-version: "3.12"
enable-cache: true
Expand Down Expand Up @@ -268,6 +277,13 @@ jobs:
"examples/19_bilinear_control_koopman.ipynb",
"examples/22_gnn_forecaster_comparison.ipynb",
"examples/23_hierarchical_multiresolution.ipynb",
"examples/47_benchmark_manifest.ipynb",
"examples/48_identification_invariance.ipynb",
"examples/50_graph_state_closure.ipynb",
"examples/51_spectral_diagnostics.ipynb",
"examples/52_cochain_hodge_modes.ipynb",
"examples/53_latent_rank_selection.ipynb",
"examples/54_criticality_monitor.ipynb",
]
),
}
Expand All @@ -289,11 +305,12 @@ jobs:
),
},
{
"shard": "27-46",
"shard": "27-54",
"pattern": (
"examples/2[7-9]_*.ipynb "
"examples/3[0-9]_*.ipynb "
"examples/4[0-6]_*.ipynb"
"examples/4[0-9]_*.ipynb "
"examples/5[0-4]_*.ipynb"
),
},
]
Expand All @@ -316,7 +333,7 @@ jobs:
- uses: actions/checkout@v7

- name: Install uv
uses: astral-sh/setup-uv@v9.0.0
uses: astral-sh/setup-uv@v10.0.1
with:
python-version: "3.12"
enable-cache: true
Expand All @@ -325,7 +342,7 @@ jobs:
- name: Install dependencies
run: >
uv sync --frozen
--extra dev --extra rl --extra mpc --extra symmetry
--extra dev --extra rl --extra mpc --extra symmetry --extra cli

- name: Execute tutorial notebooks
env:
Expand All @@ -344,7 +361,7 @@ jobs:
- uses: actions/checkout@v7

- name: Install uv
uses: astral-sh/setup-uv@v9.0.0
uses: astral-sh/setup-uv@v10.0.1
with:
python-version: "3.12"
enable-cache: true
Expand All @@ -356,11 +373,38 @@ jobs:
- name: Build Sphinx documentation
run: uv run --no-sync sphinx-build -b html -W --keep-going docs/source docs/build/html

benchmark-smoke:
# Identity-bound verify on hashed synthetics. Not METR-LA training.
name: benchmark-smoke
needs: changes
if: needs.changes.outputs.benchmark == 'true' || needs.changes.outputs.workflow == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- name: Install uv
uses: astral-sh/setup-uv@v10.0.1
with:
python-version: "3.12"
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Install dependencies
run: uv sync --frozen --extra cli

- name: Verify smoke manifests
run: |
for track in smoke_telemetry smoke_multiphysics smoke_topology_transfer; do
uv run --no-sync koopman-graph benchmark verify \
--manifest "benchmarks/v0.15/${track}.yaml" \
--against "benchmarks/v0.15/summaries/${track}.json"
done

# Single required check for branch protection. Individual jobs may be skipped
# by path filters; this aggregator still reports success when skips are expected.
ci:
name: ci
needs: [changes, lint, test, test-macos, notebook-plan, notebooks, docs]
needs: [changes, lint, test, test-macos, notebook-plan, notebooks, docs, benchmark-smoke]
if: always()
runs-on: ubuntu-latest
steps:
Expand All @@ -383,6 +427,7 @@ jobs:
"notebook-plan",
"notebooks",
"docs",
"benchmark-smoke",
):
result = needs[job]["result"]
if result not in ("success", "skipped"):
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v7

- name: Install uv
uses: astral-sh/setup-uv@v9.0.0
uses: astral-sh/setup-uv@v10.0.1
with:
python-version: "3.12"
enable-cache: true
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
- uses: actions/checkout@v7

- name: Install uv
uses: astral-sh/setup-uv@v9.0.0
uses: astral-sh/setup-uv@v10.0.1
with:
python-version: "3.12"
enable-cache: true
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ docs/MATHEMATICS_VERIFICATION.md
.cursor-tmp/
docs/blueprint/

# Local run artifacts (benchmark summaries, CLI checkpoints, tracking CSVs).
artifacts/

# Large / non-shipped benchmark downloads (rebuild via scripts/download_*.py).
# Tracked teaching fixtures and source files under 50 MB may live under
# data/metr_la/, data/ieee118/, data/cylinder_wake/, data/pems_bay/,
Expand Down
Loading
Loading