Repository navigation
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_wmgCLI which buildskeisler,graphcastandhierarchicalgraphs with weather-model-graphs, deprecatingneural_lam.create_graph. #596 @prajwal-tech07 -
Add
--num_sanity_val_stepsCLI argument to control sanity validation steps before training #694 -
Add
--train_steps_to_logCLI option to log training loss for individual unroll steps, and deduplicate common prediction and loss computation steps across loops #675 @GiGiKoneti -
Add
PropagationNetGNN layer that incentivises directional message
propagation from sender to receiver nodes, and expose it alongside
InteractionNetthrough 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. AGNN_TYPESregistry
andget_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 raisesIndexError. #472 @sudhansu-24 -
Split the training checkpoint setup into two callbacks: a validation-driven one that keeps the best
val_mean_losscheckpoint (min_val_loss.ckpt) and a separate rescue callback that writeslast.ckptat every train-epoch end. Long HPC jobs that crash or time out between validation runs can resume fromlast.ckptinstead 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/WeatherDataModuleno longer
take astandardizeargument.
#239 @Sharkyii -
Split
ARModelintoForecasterModule,Forecasterand
StepPredictor, and reorganiseneural_lam.modelsto mirror the new
hierarchy (forecasters/,step_predictors/,step_predictors/graph/).
DecoupleNeuralLAMConfigfrom the predictor stack:StepPredictorand
the graph-based predictors now takeoutput_clamping_lower/
output_clamping_upperdicts directly instead of the full config, so
NeuralLAMConfigno longer propagates belowForecasterModule.
#208
@Sir-Sloth-The-Lazy -
Change metric heatmap (
plot_error_map, nowplot_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 acrosssaved_models/,lightning_logs/,wandb/, andmlruns/#580 @sudhansu-24
Fixed
-
Raise
ValueErrorinstead of a bareassertwhen anoutput_clampinglowerlimit is not smaller than itsupperlimit inStepPredictor.prepare_clamping_params, so the check is no longer stripped underpython -O#757 @RudraDudhat2509 -
Derive the
plot_error_heatmaplead-time axis label from a full unit-name
lookup instead oftime_step_unit[0], which renderedminutes,
millisecondsandmicrosecondsall as "m" andunknownas "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 < 1in--train_steps_to_log,--val_steps_to_log, and--var_leads_metrics_watchat CLI parse time, instead of silently logging the wrong step's loss via negative-index wraparound inForecasterModule._log_step_loss#746 @RudraDudhat2509 -
Fix
compute_standardization_stats.py --distributedsilently keeping padded rows and dropping real ones whenlen(dataset) % world_size != 0. Padded rows are now masked out per rank before the gather. #748 @nikhil3495 -
Set
workers=Trueinseed_everythingto properly seed DataLoader workers, ensuring uncorrelated random states across processes whennum_workers > 0#716 @GiGiKoneti -
Fix
StepPredictor.forwarddocstring 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_lamtraining and checkpoint reloads crashing on hierarchical-only GNN options, by routing both call sites through abuild_predictorhelper that only passesmesh_up_gnn_type/mesh_down_gnn_typetoBaseHiGraphModelsubclasses. #688 @gitcommit90 -
Build the training logger config from the public
datastore.configaccessor instead of the MDP-specific private_configattribute, so any datastore implementingBaseDatastorecan be driven through the training entry point without raisingAttributeError#723 @zakirkg -
Exclude boundary nodes from the spatial loss maps computed in
test_step, so the plotted loss maps and the savedmean_spatial_loss.ptcover the interior only, consistent with every other loss and metric call inForecasterModule#720 @RajdeepKushwaha5 @NoiceHax -
Fix
RuntimeErrorinHiLAMParallelforward pass on hierarchical graphs by offsetting edge indices into the global mesh node index space #680 -
Fix
IndexErrorin HiLAM forward pass by offsetting grid nodes inzero_index_g2m/zero_index_m2gby the total mesh-node count across all levels #643 @Sir-Sloth-The-Lazy -
Fix
AssertionErrorinaggregate_and_plot_metricswhen using--metrics_watchflags by usingisinstancedispatch for figure vs scalar logging #303 @AftAb-25 -
Resolve
xarrayFacetGridDeprecationWarninginplot_example.pyby using a compatibility shim #482 @sohampatil01-svg -
Fix missing space in
loss_weighting.pyerror message f-string concatenation that produced "featurein" instead of "feature in" #573 @RajdeepKushwaha5 -
Add missing bounds check in
test_stepto preventIndexErrorwhenval_steps_to_logexceeds prediction steps #220 @santhil-cyber -
Fix
IndexErrorin distributed flux stats gathering and silent diff stats shape corruption incompute_standardization_stats.pywhen running with--distributedandworld_size > 1#411 @RajdeepKushwaha5 -
Raise
ValueErrorfor unsupported--loggervalues insetup_training_logger, preventing a misleadingUnboundLocalErroron misconfigured logger types #463 @Ritinikhil -
Fix image overwriting in
plot_examplesfor 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.Imagefile handle and delete the temporary.pngafter upload inCustomMLFlowLogger.log_image, fixing a resource leak and temp-file accumulation in CWD; replacesys.exit(1)onNoCredentialsErrorwith a re-raise so callers can handle the failure #496 @Zrahay -
Reset
plotted_examplesand cleartest_metricsat the end ofon_test_epoch_endso repeatedtrainer.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
Aggto preventRuntimeError: main thread is not in main loopin headless or multi-threaded contexts, without overriding a user-setMPLBACKEND#277 @sahilkr31 -
Log every figure passed to
CustomMLFlowLogger.log_imageinstead 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_watchvariable indices against the datastore intrain_model.pyso an out-of-range index raises a clear CLI error immediately, instead of anIndexErrordeep 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), includenum_past_forcing_stepsin the forecast-mode minimum-horizon check, validate forcing-side forecast horizon when forcing is present, and usemin(n_state, n_forcing)when both are present in analysis mode; raiseIndexErrorfor out-of-range indices inWeatherDataset.__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/cachestep 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_staticmesh-node static-feature dimension tonum_mesh_static_varsin comments and docstrings, matching the canonicalnum_*naming. #695 @uttam12331 -
Add 100% type-hint coverage across
neural_lam/, align all type annotations with PEP 585 and PEP 604, and adoptty(astral-sh) for type checking #673 @GiGiKoneti -
Add a root
CONTRIBUTING.mdwalking 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 trimAGENTS.mdand the README "Development and Contributing" section down to pointers at it #407 @ANANYA542 -
Split the monolithic
neural_lam/utils.pyinto aneural_lam/utils/package with one module per concern (buffer_list,graph,networks,plot,logging,tensor,time);utils/__init__.pyre-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 aninterrogatepre-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
slowpytest marker and apply it totest_trainingandtest_training_output_stdso contributors can skip long-running training tests during local iteration viapytest -m "not slow". #651 @sadamov -
Add a short README pointer to #163 for DGX Spark / PyTorch container compatibility notes, so users hitting
torch_scattererrors 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 Publicationssubheading for clearer structure #633 @HetaviM29 -
Add unit tests for
inverse_softpluscovering roundtrip identity (parametrized overbeta), near-zero clamping, and above-threshold linear passthrough #419 @Riteesh-NITT -
Add regression test that
datastoreandforecasterstay excluded from the saved Lightning hyperparameters (in-memory and on-disk after a checkpoint round-trip), soload_from_checkpointcontinues 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.pyandneural_lam/plot_graph.py#622 @GiGiKoneti -
Group
train_model.py --helpoutput 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
DummyDatastoreby adding a__del__method, preventingResourceWarningduring 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_stdbroadcasting 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 committeduv.lock. CI now installs and
tests only withuv(CPU + CUDA 13.0); thepipinstall 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 matchingtorchvariant 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