Skip to content

v0.7.0

Latest

Choose a tag to compare

@joeloskarsson joeloskarsson released this 12 Oct 07:47
· 34 commits to main since this release
d5df37e

This release contains two major improvements to the codebase: splitting the monolithic ARModel into a modular ForecasterModule / Forecaster / StepPredictor hierarchy and adding graph creation through the weather-model-graphs package.
It also contains a number of smaller improvements, bug fixes and maintenance updates.

Added

  • Add latent encoder/decoder modules and the GraphEFM (hierarchical) / GraphEFMMultiScale (flat) step predictors for the Graph-EFM ensemble forecasting model. #648 @Sir-Sloth-The-Lazy

  • Add neural_lam.create_graph_with_wmg CLI which builds keisler, graphcast and hierarchical graphs with weather-model-graphs, deprecating neural_lam.create_graph. #596 @prajwal-tech07

  • 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 #675 @GiGiKoneti

  • Add PropagationNet GNN layer that incentivises directional message
    propagation from sender to receiver nodes, and expose it alongside
    InteractionNet through four new CLI arguments (--g2m_gnn_type,
    --m2g_gnn_type, --mesh_up_gnn_type, --mesh_down_gnn_type) so
    each edge-type's GNN can be chosen independently. A GNN_TYPES registry
    and get_gnn_class() helper make it straightforward to register further
    GNN types in the future.
    #507
    @Sir-Sloth-The-Lazy

  • Extend BufferList.__getitem__ with slice and negative-index support (Python sequence semantics); out-of-bounds integer access raises IndexError. #472 @sudhansu-24

  • Split the training checkpoint setup into two callbacks: a validation-driven one that keeps the best val_mean_loss checkpoint (min_val_loss.ckpt) and a separate rescue callback that writes last.ckpt at every train-epoch end. Long HPC jobs that crash or time out between validation runs can resume from last.ckpt instead of losing all progress since the previous validation #250 @Jayant-kernel

  • Graph storage specification (docs/graph_storage_spec.md), PEP 723–compliant validator script (docs/validate_graph.py), and pre-commit hook keeping the spec in sync with the validator for the torch-tensors-on-disk graph format currently used in neural-lam #323 @leifdenby

Changed

  • Move data normalization from CPU (WeatherDataset) to GPU
    (ForecasterModule.on_after_batch_transfer) for improved performance and
    multi-GPU compatibility. WeatherDataset / WeatherDataModule no longer
    take a standardize argument.
    #239 @Sharkyii

  • Split ARModel into ForecasterModule, Forecaster and
    StepPredictor, and reorganise neural_lam.models to mirror the new
    hierarchy (forecasters/, step_predictors/, step_predictors/graph/).
    Decouple NeuralLAMConfig from the predictor stack: StepPredictor and
    the graph-based predictors now take output_clamping_lower /
    output_clamping_upper dicts directly instead of the full config, so
    NeuralLAMConfig no longer propagates below ForecasterModule.
    #208
    @Sir-Sloth-The-Lazy

  • Change metric heatmap (plot_error_map, now plot_error_heatmap) to use a
    shared cross-variable color scale instead of per-row normalization, add a
    colorbar, and scale figure size and font sizes with grid dimensions
    #376

  • Consolidate all training/evaluation run outputs (checkpoints, logger files, plots) into a single runs/<run-name>/ directory instead of scattering across saved_models/, lightning_logs/, wandb/, and mlruns/ #580 @sudhansu-24

Fixed

  • Raise ValueError instead of a bare assert when an output_clamping lower limit is not smaller than its upper limit in StepPredictor.prepare_clamping_params, so the check is no longer stripped under python -O #757 @RudraDudhat2509

  • Derive the plot_error_heatmap lead-time axis label from a full unit-name
    lookup instead of time_step_unit[0], which rendered minutes,
    milliseconds and microseconds all as "m" and unknown as "u"; the
    label now reads e.g. "min" / "ms" and falls back to "steps" when no unit
    divides the step length evenly #743 @nikhil3495

  • Reject step < 1 in --train_steps_to_log, --val_steps_to_log, and --var_leads_metrics_watch at CLI parse time, instead of silently logging the wrong step's loss via negative-index wraparound in ForecasterModule._log_step_loss #746 @RudraDudhat2509

  • Fix compute_standardization_stats.py --distributed silently keeping padded rows and dropping real ones when len(dataset) % world_size != 0. Padded rows are now masked out per rank before the gather. #748 @nikhil3495

  • Set workers=True in seed_everything to properly seed DataLoader workers, ensuring uncorrelated random states across processes when num_workers > 0 #716 @GiGiKoneti

  • Fix StepPredictor.forward docstring stating the argument order backwards ((X_{t-1}, X_t, forcing_t) instead of (X_t, X_{t-1}, forcing_t)), contradicting its own per-parameter docs and signature #731 @AshNicolus

  • Fix graph_lam training and checkpoint reloads crashing on hierarchical-only GNN options, by routing both call sites through a build_predictor helper that only passes mesh_up_gnn_type / mesh_down_gnn_type to BaseHiGraphModel subclasses. #688 @gitcommit90

  • Build the training logger config from the public datastore.config accessor instead of the MDP-specific private _config attribute, so any datastore implementing BaseDatastore can be driven through the training entry point without raising AttributeError #723 @zakirkg

  • Exclude boundary nodes from the spatial loss maps computed in test_step, so the plotted loss maps and the saved mean_spatial_loss.pt cover the interior only, consistent with every other loss and metric call in ForecasterModule #720 @RajdeepKushwaha5 @NoiceHax

  • Fix RuntimeError in HiLAMParallel forward pass on hierarchical graphs by offsetting edge indices into the global mesh node index space #680

  • 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 #643 @Sir-Sloth-The-Lazy

  • Fix AssertionError in aggregate_and_plot_metrics when using --metrics_watch flags by using isinstance dispatch for figure vs scalar logging #303 @AftAb-25

  • Resolve xarray FacetGrid DeprecationWarning in plot_example.py by using a compatibility shim #482 @sohampatil01-svg

  • Fix missing space in loss_weighting.py error message f-string concatenation that produced "featurein" instead of "feature in" #573 @RajdeepKushwaha5

  • Add missing bounds check in test_step to prevent IndexError when val_steps_to_log exceeds prediction steps #220 @santhil-cyber

  • Fix IndexError in distributed flux stats gathering and silent diff stats shape corruption in compute_standardization_stats.py when running with --distributed and world_size > 1 #411 @RajdeepKushwaha5

  • Raise ValueError for unsupported --logger values in setup_training_logger, preventing a misleading UnboundLocalError on misconfigured logger types #463 @Ritinikhil

  • Fix image overwriting in plot_examples for non-Wandb loggers by including the example index in the log key (the previous logic had the two branches inverted relative to its own comment) #205 @Shristi-Goel

  • Close the PIL.Image file handle and delete the temporary .png after upload in CustomMLFlowLogger.log_image, fixing a resource leak and temp-file accumulation in CWD; replace sys.exit(1) on NoCredentialsError with a re-raise so callers can handle the failure #496 @Zrahay

  • Reset plotted_examples and clear test_metrics at the end of on_test_epoch_end so repeated trainer.test() calls on the same model instance regenerate example plots and start from a clean metric slate instead of silently skipping plots and accumulating tensors #437 @RajdeepKushwaha5

  • Default the matplotlib backend to Agg to prevent RuntimeError: main thread is not in main loop in headless or multi-threaded contexts, without overriding a user-set MPLBACKEND #277 @sahilkr31

  • Log every figure passed to CustomMLFlowLogger.log_image instead of silently dropping all but the first, using per-figure indexed keys ({key}_{i}) when more than one is supplied #499 @Raj-Taware

  • Validate --var_leads_metrics_watch variable indices against the datastore in train_model.py so an out-of-range index raises a clear CLI error immediately, instead of an IndexError deep in the first validation epoch after potentially hours of training #306 @Ayushhgit

  • Fix WeatherDataset.__len__ off-by-one in analysis mode (was undercounting by 1 sample), include num_past_forcing_steps in the forecast-mode minimum-horizon check, validate forcing-side forecast horizon when forcing is present, and use min(n_state, n_forcing) when both are present in analysis mode; raise IndexError for out-of-range indices in WeatherDataset.__getitem__ (with Python-style negative indexing support) #312 @kshirajahere

Maintenance

  • Cache the mdp example input data in CI with fsspec simplecache, so the DANRA inputs are no longer downloaded on every run #751 @KumarShivam1908

  • Use the combined actions/cache step for the meps test-data cache in CI, so a PR that restores the existing cache no longer saves a duplicate copy under its own branch #754 @KumarShivam1908

  • Rename the d_mesh_static mesh-node static-feature dimension to num_mesh_static_vars in comments and docstrings, matching the canonical num_* naming. #695 @uttam12331

  • Add 100% type-hint coverage across neural_lam/, align all type annotations with PEP 585 and PEP 604, and adopt ty (astral-sh) for type checking #673 @GiGiKoneti

  • Add a root CONTRIBUTING.md walking a new contributor from fork to merged PR (issue triage, environment setup pointing at the README install section, pre-commit, code standards, the exact local test command CI runs, PR template / CHANGELOG expectations, monthly dev-meeting pointer, Slack + issues for help), and trim AGENTS.md and the README "Development and Contributing" section down to pointers at it #407 @ANANYA542

  • Split the monolithic neural_lam/utils.py into a neural_lam/utils/ package with one module per concern (buffer_list, graph, networks, plot, logging, tensor, time); utils/__init__.py re-exports the full public API so existing imports are unaffected. Pure code movement, no behavioural change. #682 @Sir-Sloth-The-Lazy

  • Add comprehensive type hints to GraphLAM in neural_lam/models/step_predictors/graph/graph_lam.py #669 @GiGiKoneti

  • Add comprehensive type hints to ARForecaster in neural_lam/models/forecasters/autoregressive.py #663 @GiGiKoneti

  • Add comprehensive type hints to StepPredictor in neural_lam/models/step_predictors/base.py #665 @GiGiKoneti

  • Add comprehensive type hints to BaseGraphModel in neural_lam/models/step_predictors/graph/base.py #667 @GiGiKoneti

  • Establish 100% docstring coverage across neural_lam/ via an interrogate pre-commit hook, add a Dimension Glossary to the README for canonical tensor-shape names, and rewrite public docstrings in NumPy style to serve as the entry point for the autoapi pipeline (#196 / #272). #252 @Mohit-Lakra

  • Register a slow pytest marker and apply it to test_training and test_training_output_std so contributors can skip long-running training tests during local iteration via pytest -m "not slow". #651 @sadamov

  • Add a short README pointer to #163 for DGX Spark / PyTorch container compatibility notes, so users hitting torch_scatter errors know where to find the known-working / known-failing combos #266 @Jayant-kernel

  • Group the existing Neural-LAM citation papers in the README under a ### Core Neural-LAM Publications subheading for clearer structure #633 @HetaviM29

  • Add unit tests for inverse_softplus covering roundtrip identity (parametrized over beta), near-zero clamping, and above-threshold linear passthrough #419 @Riteesh-NITT

  • Add regression test that datastore and forecaster stay excluded from the saved Lightning hyperparameters (in-memory and on-disk after a checkpoint round-trip), so load_from_checkpoint continues to require them to be passed in explicitly (#148) #232 @Jayant-kernel

  • Add comprehensive type hints to neural_lam/metrics.py #447 @sidhantpande

  • Add type hints to methods in neural_lam/custom_loggers.py #455 @sidhantpande

  • Add comprehensive type hints to neural_lam/gnn_layers.py #647 @GiGiKoneti

  • Add comprehensive type hints to neural_lam/weather_dataset.py #631 @GiGiKoneti

  • Add comprehensive type hints to neural_lam/vis.py #625 @GiGiKoneti

  • Add comprehensive type hints to neural_lam/datastore/mdp.py and neural_lam/plot_graph.py #622 @GiGiKoneti

  • Group train_model.py --help output into logical sections (Core, Runtime, Model Architecture, Training, Evaluation, Logger, Metrics & Monitoring, Data Loading & Forcing) with a terminal-width-aware formatter #641 @varma1221

  • Fix GPU CI torch version resolution to query the target wheel index instead of PyPI #639 @Sir-Sloth-The-Lazy

  • Explicitly cleanup the temporary directory in DummyDatastore by adding a __del__ method, preventing ResourceWarning during garbage collection in tests #487 @sohampatil01-svg

  • Add comprehensive type hints to all functions and class methods in utils.py #620 @GiGiKoneti

  • Add probabilistic objective regression coverage for weighted losses and pred_std broadcasting semantics #504 @kshirajahere

  • Add comprehensive type hints to neural_lam/create_graph.py #618 @GiGiKoneti

  • Select the torch build via mutually-exclusive cpu, gpu (CUDA 13.0) and
    gpu-cu128 (CUDA 12.8) extras routed through [tool.uv.sources], with torch
    versions pinned per CUDA build and a committed uv.lock. CI now installs and
    tests only with uv (CPU + CUDA 13.0); the pip install path is still
    documented in the README. The default GPU build moves from CUDA 12.8 to 13.0;
    users on other CUDA versions install the matching torch variant manually
    (see README) #604 @RajdeepKushwaha5

  • Add edge count consistency check to test_graph_creation.py #301 @osten-antonio

  • Add more detailed (module and function name) coverage linting errors #659 @leifdenby