Changelog¶
Version 2.4.0 (2024-10-02)¶
New Features
Added
strategy="fsdp_native"for PyTorch 2.0+ native FSDP with activation checkpointing.New
StochasticWeightAveragingcallback.Added
Trainer(barebones=True)mode — disables all non-essential features for maximum throughput.LightningModule.log_dict()now supports nested dict keys (e.g.,"metrics/train/loss").New
NeptuneLoggerfor Neptune.ai integration.Trainer(compile=True)shorthand to compile the model withtorch.compile().Async checkpointing: checkpoints are now saved in a background thread by default.
Breaking Changes
Dropped Python 3.8 support. Minimum is now Python 3.9.
Trainer(gpus=...)andTrainer(tpu_cores=...)removed (deprecated since 2.0). Usedevices=instead.LightningModule.on_post_move_to_device()removed.
Deprecations
Trainer(auto_lr_find=True)deprecated; usefrom lightning.pytorch.tuner import Tunerinstead.
Version 2.3.0 (2024-07-15)¶
New Features
Full PyTorch 2.3 compatibility including
torch.compile()integration.New Lightning CLI — train models from YAML config files without writing Python:
lightning fit --config config.yaml lightning validate --config config.yaml --ckpt_path best lightning predict --config config.yaml --ckpt_path last
Bug Fixes
Fixed gradient accumulation with
accumulate_grad_batches > 1andstrategy="fsdp".Fixed
ModelCheckpoint.best_model_pathreturningNoneaftertrainer.test().Fixed memory leak in
RichProgressBarwhenleave=False.
Version 2.2.0 (2024-04-11)¶
New Features
LightningModulenow supportsconfigure_model()hook for model parallel setups.Added
Trainer(reload_dataloaders_every_n_epochs=N)parameter.New
lightning.pytorch.utilities.grad_normutility function.
Version 2.0.0 (2023-09-01)¶
Major Release
Complete rewrite of the Trainer internals.
Minimum PyTorch bumped to 2.0.
Introduced
lightning.fabric.Fabric— a lightweight alternative toTrainerfor fine-grained control.New plugin system for custom accelerators and strategies.
DeepSpeedstrategy updated to DeepSpeed 0.12.Unified
lightningpackage combiningpytorch-lightningandlightning-fabric.