Skip to content
Closed
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
9 changes: 2 additions & 7 deletions .github/workflows/ci-pypi-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Build with uv
run: uv build
- uses: actions/setup-python@v5
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot understand why we have to do this ?

- uses: casperdcl/deploy-pypi@v2
with:
password: ${{ secrets.PYPI_TOKEN }}
pip: wheel -w dist/ --no-deps .
upload: ${{ github.event_name == 'release' && github.event.action == 'published' }}
12 changes: 4 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,10 @@ tags
.DS_Store
__MACOSX

# Virtual environments
# pdm (https://pdm-project.org/en/stable/)
.pdm-python
.venv
venv
activate

# Build artifacts
dist/
build/
*.egg-info/

# exclude pdm.lock file so that both cpu and gpu versions of torch will be accepted by pdm
pdm.lock
tests/test_outputs/
97 changes: 0 additions & 97 deletions AGENTS.md

This file was deleted.

54 changes: 2 additions & 52 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,60 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased](https://github.com/mllam/neural-lam/compare/v0.5.0...HEAD)

### Added

- Add `AGENTS.md` file to the repo to give agents more information about the codebase and the contribution culture.[\#416](https://github.com/mllam/neural-lam/pull/416) @sadamov

- Enable `pin_memory` in DataLoaders when GPU is available for faster async CPU-to-GPU data transfers [\#236](https://github.com/mllam/neural-lam/pull/236) @abhaygoudannavar

### Changed

- Change the default ensemble-loading behavior in `WeatherDataset` / `WeatherDataModule` to use all ensemble members as independent samples for ensemble datastores (with matching ensemble-member selection for forcing when available); single-member behavior now requires explicitly opting in via `--load_single_member` [\#332](https://github.com/mllam/neural-lam/pull/332) @kshirajahere
- Refactor graph loading: move zero-indexing out of the model and update plotting to prepare using the research-branch graph I/O [\#184](https://github.com/mllam/neural-lam/pull/184) @zweihuehner
- Replace `print()`-based `rank_zero_print` with `loguru` `logger.info()` for structured log-level control ([#33](https://github.com/mllam/neural-lam/issues/33))

### Fixed

- Initialize `da_forcing_mean` and `da_forcing_std` to `None` when forcing data is absent, fixing `AttributeError` in `WeatherDataset` with `standardize=True` [\#369](https://github.com/mllam/neural-lam/issues/369) @Sir-Sloth-The-Lazy

- Ensure proper sorting of `analysis_time` in `NpyFilesDatastoreMEPS._get_analysis_times` independent of the order in which files are processed with glob [\#386](https://github.com/mllam/neural-lam/pull/386) @Gopisokk

- Switch to lat/lon-based plotting with `pcolormesh` and `cartopy` for accurate spatial visualisation regardless of underlying projection. [\#168](https://github.com/mllam/neural-lam/pull/168) @sadamov

- Replace `shell=True` subprocess call in `compute_standardization_stats.py` with a safe argument list and Python-side hostname parsing to prevent command injection via `SLURM_JOB_NODELIST` [\#264](https://github.com/mllam/neural-lam/pull/264) @ashum9

- Avoid NaN when standardizing fields with zero std [#189](https://github.com/mllam/neural-lam/pull/189) @varunsiravuri
- Replaces multiple `assert` statements used for runtime input validation with explicit `ValueError` [\#279](https://github.com/mllam/neural-lam/pull/279) @Sir-Sloth-The-Lazy

- Fix README image paths to use absolute GitHub URLs so images display correctly on PyPI [\#188](https://github.com/mllam/neural-lam/pull/188) @bk-simon

- Fix typo in `ar_model.py` that causes `AttributeError` during evaluation [\#204](https://github.com/mllam/neural-lam/pull/204) @ritinikhil

- Changed the hardcoded True to a conditional check "persistent_workers=self.num_workers > 0" [\#235](https://github.com/mllam/neural-lam/pull/235) @santhil-cyber

- Avoid eager download of the MEPS example dataset during pytest collection by lazily initializing it in `tests/conftest.py`, allowing tests to run without triggering a dataset download at import time. [#391](https://github.com/mllam/neural-lam/pull/391) @Saptami191

- `fractional_plot_bundle` now correctly multiplies by fraction instead of dividing
[\#222](https://github.com/mllam/neural-lam/pull/222) @santhil-cyber

- Fix `all_gather_cat` producing wrong shapes on single-device runs by only flattening when `all_gather` actually introduces a new leading dimension [\#424](https://github.com/mllam/neural-lam/pull/424) @RajdeepKushwaha5

### Added

- Expose `--wandb_id` CLI argument to allow resuming an existing W&B run by
ID. When provided, `resume="allow"` is set automatically so the same job
script works for both the initial submission and all resubmissions, making
it suitable for HPC systems with limited job runtimes or that may crash.
[\#197](https://github.com/mllam/neural-lam/pull/197) @Mani212005



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

### Fixed

- Infer spatial coordinate names for MDPDatastore (rather than assuming names `x` and `y`), allows for e.g. lat/lon regular grids [\#169](https://github.com/mllam/neural-lam/pull/169) @leifdenby

- `fractional_plot_bundle` now correctly multiplies by fraction instead of dividing [
\#222](https://github.com/mllam/neural-lam/pull/222) @santhil-cyber

### Maintenance

Expand All @@ -74,10 +28,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Fix caching of MEPS example data in CI/CD [\#181](https://github.com/mllam/neural-lam/pull/181) @observingClouds

- Migrated build backend from PDM to Hatchling with hatch-vcs and added uv build in deploy CI

- Warn when running with `--eval` without `--load` to avoid accidentally evaluating randomly initialized weights [#190](https://github.com/mllam/neural-lam/pull/190) @varunsiravuri

## [v0.5.0](https://github.com/mllam/neural-lam/releases/tag/v0.5.0)

This release contains maintenance and fixes, preventing some unexpected crashes and improving CICD and testing.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![slack](https://img.shields.io/badge/slack-join-brightgreen.svg?logo=slack)](https://kutt.to/mllam)
[![slack](https://img.shields.io/badge/slack-join-brightgreen.svg?logo=slack)](https://kutt.it/mllam)
[![Linting](https://github.com/mllam/neural-lam/actions/workflows/pre-commit.yml/badge.svg?branch=main)](https://github.com/mllam/neural-lam/actions/workflows/pre-commit.yml)
[![CPU+GPU testing](https://github.com/mllam/neural-lam/actions/workflows/install-and-test.yml/badge.svg?branch=main)](https://github.com/mllam/neural-lam/actions/workflows/install-and-test.yml)

Expand Down
8 changes: 4 additions & 4 deletions neural_lam/create_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import scipy.spatial
import torch
import torch_geometric as pyg
from loguru import logger
from torch_geometric.utils.convert import from_networkx

# Local
Expand Down Expand Up @@ -231,7 +230,7 @@ def create_graph(
"""
os.makedirs(graph_dir_path, exist_ok=True)

logger.info(f"Writing graph components to {graph_dir_path}")
print(f"Writing graph components to {graph_dir_path}")

grid_xy = torch.tensor(xy)
pos_max = torch.max(torch.abs(grid_xy))
Expand Down Expand Up @@ -594,8 +593,9 @@ def cli(input_args=None):
)
args = parser.parse_args(input_args)

if args.config_path is None:
raise ValueError("Specify your config with --config_path")
assert (
args.config_path is not None
), "Specify your config with --config_path"

# Load neural-lam configuration and datastore to use
_, datastore = load_config_and_datastore(config_path=args.config_path)
Expand Down
Loading