Skip to content

v2.3.0

Latest

Choose a tag to compare

@stefaanhessmann stefaanhessmann released this 06 Nov 14:17
· 4 commits to master since this release
f75bd85

Final feature release of the 2.x line.

Upgrade notes

  • Requires pytorch_lightning >= 2.6.1 (see Requirements).
  • QM7X: databases built with earlier versions contain no PBE0 forces
    (QM7X.FPBE0). Rebuild them to get these forces.
  • MatScipyNeighborList raises a ValueError for periodic cells without volume
    (e.g. a slab with a zero c-vector). Before, it silently dropped pairs.
  • Batchwise optimizers: run() and irun() without steps now run until
    converged, as in ASE, instead of taking no step.

Requirements

  • pytorch_lightning >=2.6.1,<3 (was >=2.0.0). Before 2.6.1, DataLoader workers
    replayed the same random stream every epoch when seeded with workers=True,
    as spktrain does.
  • hydra-core >=1.3,<2 (was >=1.1.0), ase >=3.23 (was >=3.21)
  • torch <3 and numpy <3 added as upper limits
  • black, pre-commit and pytest are no longer runtime dependencies;
    pre-commit moved to the new dev extra
  • pytest <9.2 in the test extra, because pytest 9.2 breaks pytest-benchmark

Checkpointing and resuming

  • Resumed training now continues exactly: checkpoints store the RNG states.
    With trainer.deterministic=True, a resumed run is bitwise identical to an
    uninterrupted one.
  • last.ckpt always holds the latest epoch; with Lightning >=2.6 it only
    updated when the monitored metric improved
  • spktrain can resume and load checkpoints with torch >=2.6 and Lightning

    =2.6 (weights_only) (#781, #788)

  • EMA callback: training always continues from the raw weights, never from the
    EMA average: after a resume (#785), with check_val_every_n_epoch > 1, and
    with validation within an epoch
  • A resumed run stays in one TensorBoard run (version_0) and reuses its wandb run
  • A randomly drawn seed is stored in config.yaml and reused on resume

Added

  • seed and trainer.log_every_n_steps are now regular config keys
  • wandb logger config with project, run name and resume (#787)
  • Progress bar callback in the default training config (#788)
  • spktrain raises an error if the early stopping metric becomes non-finite (#802)
  • Fallback download URLs for QM9 (#774) and rMD17 (#780)
  • CI workflow with ruff and pre-commit (#799)

Fixed

  • Neighbor lists:
    • TorchNeighborList returns the correct pairs and offsets for atoms outside
      the unit cell (#816)
    • MatScipyNeighborList no longer creates offsets to periodic images along
      non-periodic directions for atoms outside the cell
    • SkinNeighborList is rebuilt whenever the cell changes. Before, it reused
      stale offsets in variable-cell relaxations and NPT runs through the ASE
      interface.
  • QM7X: FPBE0 returned the MBD forces instead of the PBE0 forces, and an
    interrupted extraction left a truncated file that later runs reused
  • spkpredict writes predictions.pt again with the default
    write_interval="epoch"
  • spkdeploy and the batchwise calculators load models with load_model, so
    models saved with older versions work again
  • Batchwise optimizers (ASEBatchwiseLBFGS) work with ASE >= 3.23
  • Response with map_properties (renamed properties) no longer fails with a
    KeyError
  • spktrain no longer crashes with more than one logger
  • script_model=True works in the MD calculators for models with CastTo64 or
    CastMap post-processors and for 2.0.x model files
  • trainer=debug_trainer works again with Lightning 2
  • ModelOutput works without metrics (#782)
  • Atomwise with aggregation_mode="avg" works for n_out > 1 (#801)
  • Hydra config search paths no longer depend on $PWD (#794)
  • ASEAtomsData opens a database connection per metadata access and write (#778)
  • Aim logger repo path
  • AtomsDataModule debug log messages; split files are now logged at info level (#798)
  • MD configs (md_configs) are included in the package data (#799)
  • LAMMPS: <torch/torch.h> no longer leaks through pair_schnetpack.h (#796)

Changed

  • ASEAtomsData caches the available property names instead of reading the
    metadata for every sample (based on #792 by @sundusaijaz)
  • import schnetpack no longer triggers the torch.jit.script deprecation warning
  • Code base reformatted and linted with ruff (#799)
  • Removed tox.ini

Documentation

  • Warning that model files are pickles and should only be loaded from trusted
    sources (#810)
  • The aim and wandb loggers need a separate install (pip install aim or
    pip install wandb)
  • Updated LAMMPS how-to (#797), fixed tutorial 5, batchwise relaxation how-to
    runs again
  • Docs requirement protobuf >=5.29.6 (CVE-2026-0994)

Known limitations

  • After a kill in the middle of an epoch, the steps replayed on resume are
    logged twice in the same run
  • The CSV logger writes each resumed part to its own version_N
  • The Aim logger starts a new run on every resume

What's Changed

Backported from dev:

New Contributors

Full Changelog: v2.2.0...v2.3.0