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
16 changes: 2 additions & 14 deletions .github/workflows/install-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,12 @@ jobs:
restore-keys: |
${{ runner.os }}-meps-reduced-example-data-v0.3.0

- name: Run smoke test
if: matrix.package_manager != 'uv'
run: |
python -c "import neural_lam; print('neural-lam imported successfully')"

- name: Run tests (excluding notebooks)
if: matrix.package_manager == 'uv'
- name: Run tests
run: |
pytest -vv -s --doctest-modules --ignore=docs/notebooks

- name: Run notebook tests
if: |
matrix.package_manager == 'uv' &&
(github.event_name == 'push' ||
contains(github.event.pull_request.labels.*.name, 'run-notebooks'))
run: |
pytest -vv -s --nbmake --nbmake-timeout=600 docs/notebooks/
# Notebooks run in their own path-filtered, CPU-only workflow
# (.github/workflows/notebook-tests.yml).

- name: Upload test figures
uses: actions/upload-artifact@v4
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/notebook-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Runs the docs/notebooks/ tutorials end-to-end with nbmake so that API drift
# in neural_lam breaks the notebook loudly instead of letting it rot. CPU-only.
# Scoped to PRs that touch code the notebooks depend on (plus every push to
# main and manual dispatch), so unrelated PRs don't pay the ~3 min cost.
name: Notebook tests

on:
push:
branches: [main]
pull_request:
paths:
- "neural_lam/**"
- "docs/notebooks/**"
- "tests/datastore_examples/**"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/notebook-tests.yml"
workflow_dispatch:

jobs:
notebooks:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python 3.13
uses: actions/setup-python@v6
with:
python-version: 3.13

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Install with uv
run: |
uv sync --extra cpu --group dev --locked
echo "$PWD/.venv/bin" >> $GITHUB_PATH

- name: Run notebook tests
run: |
pytest -vv -s --nbmake --nbmake-timeout=600 docs/notebooks/
19 changes: 8 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [unreleased](https://github.com/mllam/neural-lam/compare/v0.6.0...HEAD)

### Added
- Add `hello_world_danra.ipynb` end-to-end tutorial notebook for training on DANRA, with a dedicated path-filtered CI workflow that runs it end-to-end via `nbmake` [\#577](https://github.com/mllam/neural-lam/pull/577) @Sharkyii

- Add `--num_sanity_val_steps` CLI argument to control sanity validation steps before training (#694)

- Add `--train_steps_to_log` CLI option to log training loss for individual unroll steps, and deduplicate common prediction and loss computation steps across loops [\#674](https://github.com/mllam/neural-lam/issues/674) @GiGiKoneti
Expand Down Expand Up @@ -48,6 +50,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- `train_model.main` now re-raises on error (`@logger.catch(reraise=True)`) instead of logging and exiting 0, so training/eval failures surface to callers and CI (e.g. the notebook `nbmake` run) rather than passing silently [\#577](https://github.com/mllam/neural-lam/pull/577)

- Allow `graph_lam` training and checkpoint reloads to accept the full set of
GNN type CLI options without passing hierarchical-only options to unsupported
constructors via a shared `build_predictor` helper ([#686](https://github.com/mllam/neural-lam/issues/686)).

- Fix `RuntimeError` in `HiLAMParallel` forward pass on hierarchical graphs by offsetting edge indices into the global mesh node index space ([#679](https://github.com/mllam/neural-lam/issues/679))

- Fix `IndexError` in HiLAM forward pass by offsetting grid nodes in `zero_index_g2m`/`zero_index_m2g` by the total mesh-node count across all levels ([#642](https://github.com/mllam/neural-lam/issues/642)) @Sir-Sloth-The-Lazy
Expand Down Expand Up @@ -197,19 +205,8 @@ This release introduces new features including GIF animation support, wandb run

- Fix Slack domain link [\#288](https://github.com/mllam/neural-lam/pull/288) @sadamov

### Added

- Run notebooks in `docs/notebooks/` as pytest tests via `nbmake` in CI refs [\#69](https://github.com/mllam/neural-lam/issues/69)
- Add 10-minute timeout for notebook cell execution via `--nbmake-timeout=600` [\#577](https://github.com/mllam/neural-lam/pull/577)

### Changed

- Notebook tests now run selectively: on push to main or when PR has `run-notebooks` label [\#577](https://github.com/mllam/neural-lam/pull/577)

### Maintenance

- Fix notebook CI failure by adding pytest fixture to create required `danra.datastore.zarr` file and removing duplicate `[build-system]` section in `pyproject.toml` [\#577](https://github.com/mllam/neural-lam/pull/577)

- Update PR template to clarify milestone/roadmap requirement and maintenance changes [\#186](https://github.com/mllam/neural-lam/pull/186) @joeloskarsson

- Update CI/CD to use python 3.13 for testing and full range of current python versions for linting (3.10 - 3.14) [\#173](https://github.com/mllam/neural-lam/pull/173) @observingClouds
Expand Down
Loading