Skip to content

Releases: Lightning-AI/pytorch-lightning

Lightning v2.6.1

30 Jan 14:57

Choose a tag to compare

Changes in 2.6.1

PyTorch Lightning

Added
  • Added method chaining support to LightningModule.freeze() and LightningModule.unfreeze() by returning self (#21469)
  • Added litlogger integration(#21430)
Deprecated
  • Deprecated to_torchscript method due to deprecation of TorchScript in PyTorch (#21397)
Removed
  • Removed support for Python 3.9 due to end-of-life status (#21398)
Fixed
  • Fixed save_hyperparameters(ignore=...) behavior so subclass ignore rules override base class rules (#21490)
  • Fixed LightningDataModule.load_from_checkpoint to restore the datamodule subclass and hyperparameters (#21478)
  • Fixed ModelParallelStrategy single-file checkpointing when torch.compile wraps the model so optimizer states no longer raise KeyError during save (#21357)
  • Sanitize profiler filenames when saving to avoid crashes due to invalid characters (#21395)
  • Fixed StochasticWeightAveraging with infinite epochs (#21396)
  • Fixed _generate_seed_sequence_sampling function not producing unique seeds (#21399)
  • Fixed ThroughputMonitor callback emitting warnings too frequently (#21453)

Lightning Fabric

Added
  • Exposed weights_only argument for loading checkpoints in Fabric.load() and Fabric.load_raw() (#21470)
Fixed
  • Fixed DistributedSamplerWrapper not forwarding set_epoch to the underlying sampler (#21454)
  • Fixed DDP notebook CUDA fork check to allow passive initialization when CUDA is not actively used (#21402)

Full commit list: 2.6.0 -> 2.6.1

Contributors

New Contributors

We thank all folks who submitted issues, features, fixes and doc changes. It's the only way we can collectively make Lightning ⚡ better for everyone, nice job!

In particular, we would like to thank the authors of the pull-requests above

Lightning v2.6.0

28 Nov 09:33
8540370

Choose a tag to compare

Changes in 2.6.0

PyTorch Lightning

Added
  • Added WeightAveraging callback that wraps the PyTorch AveragedModel class (#20545)
  • Added Torch-Tensorrt integration with LightningModule (#20808)
  • Added time-based validation support though val_check_interval (#21071)
  • Added attributes to access stopping reason in EarlyStopping callback (#21188)
  • Added support for variable batch size in ThroughputMonitor (#20236)
  • Added EMAWeightAveraging callback that wraps Lightning's WeightAveraging class (#21260)
Changed
  • Expose weights_only argument for Trainer.{fit,validate,test,predict} and let torch handle default value (#21072)
  • Default to RichProgressBar and RichModelSummary if the rich package is available. Fallback to TQDMProgressBar and ModelSummary otherwise (#20896)
  • Add MPS accelerator support for mixed precision (#21209)
Fixed
  • Fixed edgecase when max_trials is reached in Tuner.scale_batch_size (#21187)
  • Fixed case where LightningCLI could not be initialized with trainer_default containing callbacks (#21192)
  • Fixed missing reset when ModelPruning is applied with lottery ticket hypothesis (#21191)
  • Fixed preventing recursive symlink creation iwhen save_last='link' and save_top_k=-1 (#21186)
  • Fixed last.ckpt being created and not linked to another checkpoint (#21244)
  • Fixed bug that prevented BackboneFinetuning from being used together with LearningRateFinder (#21224)
  • Fixed ModelPruning sparsity logging bug that caused incorrect sparsity percentages (#21223)
  • Fixed LightningCLI loading of hyperparameters from ckpt_path failing for subclass model mode (#21246)
  • Fixed check the init args only when the given frames are in __init__ method (#21227)
  • Fixed how ThroughputMonitor calculated training time (#21291)
  • Fixed synchronization of gradients in manual optimization with DDPStrategy(static_graph=True) (#21251)
  • Fixed FSDP mixed precision semantics and added user warning (#21361)

Lightning Fabric

Changed
  • Expose weights_only argument for Trainer.{fit,validate,test,predict} and let torch handle default value (#21072)
  • Set _DeviceDtypeModuleMixin._device from torch's default device function (#21164)
  • Added kwargs-filtering for Fabric.call to support different callback method signatures (#21258)
Fixed
  • Fixed issue in detecting MPIEnvironment with partial mpi4py installation (#21353)
  • Learning rate scheduler is stepped at the end of epoch when on_train_batch_start returns -1 (#21296).
  • Fixed FSDP mixed precision semantics and added user warning (#21361)

Full commit list: 2.5.0 -> 2.6.0

Contributors

We thank all folks who submitted issues, features, fixes and doc changes. It's the only way we can collectively make Lightning ⚡ better for everyone, nice job!

In particular, we would like to thank the authors of the pull-requests above

Lightning v2.5.6

05 Nov 20:51
5b3bb74

Choose a tag to compare

Changes in 2.5.6

PyTorch Lightning

Changed
  • Add name() function to accelerator interface ((#21325))
Removed
  • Remove support for deprecated and archived lightning-habana package (#21327)

Lightning v2.5.5

05 Sep 15:59

Choose a tag to compare

Changes in 2.5.5

PyTorch Lightning

Changed
  • Include exclude_frozen_parameters to DeepSpeedStrategy (#21060)
  • Include PossibleUserWarning that is raised if modules are in eval mode when training starts (#21146)
Fixed
  • Fixed LightningCLI not using ckpt_path hyperparameters to instantiate classes (#21116)
  • Fixed callbacks by defer step/time-triggered ModelCheckpoint saves until validation metrics are available (#21106)
  • Fixed with adding a missing device id for pytorch 2.8 (#21105)
  • Fixed TQDMProgressBar not resetting correctly when using both a finite and iterable dataloader (#21147)
  • Fixed cleanup of temporary files from Tuner on crashes (#21162)

Lightning Fabric

Changed
  • Include exclude_frozen_parameters to DeepSpeedStrategy (#21060)
  • Let _get_default_process_group_backend_for_device support more hardware platforms (
    #21057, #21093)
Fixed
  • Fixed with adding a missing device id for pytorch 2.8 (#21105)
  • Respecting verbose=False in seed_everything when no seed is provided (#21161)

Full commit list: 2.5.4 -> 2.5.5

Contributors

We thank all folks who submitted issues, features, fixes and doc changes. It's the only way we can collectively make Lightning ⚡ better for everyone, nice job!

In particular, we would like to thank the authors of the pull-requests above, in no particular order:

@Borda, @KAVYANSHTYAGI, @littlebullGit, @mauvilsa, @SkafteNicki, @taozhiwei

Thank you ❤️ and we hope you'll keep them coming!

Lightning v2.5.4

29 Aug 11:44

Choose a tag to compare

Changes in 2.5.4

PyTorch Lightning

Fixed
  • Fixed AsyncCheckpointIO snapshots tensors to avoid race with parameter mutation (#21079)
  • Fixed AsyncCheckpointIO threadpool exception if calling fit or validate more than one (#20952)
  • Fixed learning rate not being correctly set after using LearningRateFinder callback (#21068)
  • Fixed misalignment column while using rich model summary in DeepSpeedstrategy (#21100)
  • Fixed RichProgressBar crashing when sanity checking using val dataloader with 0 len (#21108)

Lightning Fabric

Changed
  • Added support for NVIDIA H200 GPUs in get_available_flops (#20913)

Full commit list: 2.5.3 -> 2.5.4

Contributors

We thank all folks who submitted issues, features, fixes and doc changes. It's the only way we can collectively make Lightning ⚡ better for everyone, nice job!

In particular, we would like to thank the authors of the pull-requests above, in no particular order:

@fnhirwa, @GdoongMathew, @jjh42, @littlebullGit, @SkafteNicki

Thank you ❤️ and we hope you'll keep them coming!

Lightning v2.5.3

13 Aug 20:28

Choose a tag to compare

Notable changes in this release

PyTorch Lightning

Changed
  • Added save_on_exception option to ModelCheckpoint Callback (#20916)
  • Allow dataloader_idx_ in log names when add_dataloader_idx=False (#20987)
  • Allow returning ONNXProgram when calling to_onnx(dynamo=True) (#20811)
  • Extended support for general mappings being returned from training_step when using manual optimization (#21011)
Fixed
  • Fixed Allowing trainer to accept CUDAAccelerator instance as accelerator with FSDP strategy (#20964)
  • Fixed progress bar console clearing for Rich 14.1+ (#21016)
  • Fixed AdvancedProfiler to handle nested profiling actions for Python 3.12+ (#20809)
  • Fixed rich progress bar error when resume training (#21000)
  • Fixed double iteration bug when resumed from a checkpoint. (#20775)
  • Fixed support for more dtypes in ModelSummary (#21034)
  • Fixed metrics in RichProgressBar being updated according to user provided refresh_rate (#21032)
  • Fixed save_last behavior in the absence of validation (#20960)
  • Fixed integration between LearningRateFinder and EarlyStopping (#21056)
  • Fixed gradient calculation in lr_finder for mode="exponential" (#21055)
  • Fixed save_hyperparameters crashing with dataclasses using init=False fields (#21051)

Lightning Fabric

Changed
  • Enable "auto" for devices and accelerator as CLI arguments (#20913)
  • Raise ValueError when seed is out-of-bounds or cannot be cast to int (#21029)
Fixed
  • Fixed remove extra name parameter in accelerator registry decorator (#20975)
  • Fixed XLA strategy to add support for global_ordinal, local_ordinal, world_size which came instead of deprecated methods (#20852)

Full commit list: 2.5.2 -> 2.5.3

Contributors

We thank all folks who submitted issues, features, fixes and doc changes. It's the only way we can collectively make Lightning ⚡ better for everyone, nice job!

In particular, we would like to thank the authors of the pull-requests above, in no particular order:

@baskrahmer, @bhimrazy, @deependujha, @fnhirwa, @GdoongMathew, @jonathanking, @relativityhd, @rittik9, @SkafteNicki, @sudiptob2, @vsey, @YgLK

Thank you ❤️ and we hope you'll keep them coming!

Lightning v2.5.2

20 Jun 15:56

Choose a tag to compare

Notable changes in this release

PyTorch Lightning

Changed
  • Add toggled_optimizer(optimizer) method to the LightningModule, which is a context manager version of toggle_optimize and untoggle_optimizer (#20771)
  • For cross-device local checkpoints, instruct users to install fsspec>=2025.5.0 if unavailable (#20780)
  • Check param is of nn.Parameter type for pruning sanitization (#20783)
Fixed
  • Fixed save_hyperparameters not working correctly with LightningCLI when there are parsing links applied on instantiation (#20777)
  • Fixed logger_connector has an edge case where step can be a float (#20692)
  • Fixed Synchronize SIGTERM Handling in DDP to Prevent Deadlocks (#20825)
  • Fixed case-sensitive model name (#20661)
  • CLI: resolve jsonargparse deprecation warning (#20802)
  • Fix: move check_inputs to the target device if available during to_torchscript (#20873)
  • Fixed progress bar display to correctly handle iterable dataset and max_steps during training (#20869)
  • Fixed problem for silently supporting jsonnet (#20899)

Lightning Fabric

Changed
  • Ensure correct device is used for autocast when mps is selected as Fabric accelerator (#20876)
Removed
  • Fix: TransformerEnginePrecision conversion for layers with bias=False (#20805)

Full commit list: 2.5.1 -> 2.5.2

Contributors

We thank all folks who submitted issues, features, fixes, and doc changes. It's the only way we can collectively make Lightning ⚡ better for everyone, nice job!

In particular, we would like to thank the authors of the pull-requests above, in no particular order:

@adamjstewart, @Armannas, @bandpooja, @Borda, @chanokin, @duydl, @GdoongMathew, @KAVYANSHTYAGI, @mauvilsa, @muthissar, @rustamzh, @siemdejong

Thank you ❤️ and we hope you'll keep them coming!

Lightning v2.5.1.post

25 Apr 20:23

Choose a tag to compare

Lightning v2.5.1

19 Mar 20:26

Choose a tag to compare

Changes

PyTorch Lightning

Changed
  • Allow LightningCLI to use a customized argument parser class (#20596)
  • Change wandb default x-axis to tensorboard's global_step when sync_tensorboard=True (#20611)
  • Added a new checkpoint_path_prefix parameter to the MLflow logger which can control the path to where the MLflow artifacts for the model checkpoints are stored (#20538)
  • CometML logger was updated to support the recent Comet SDK (#20275)
  • bump: testing with latest torch 2.6 (#20509)
Fixed
  • Fixed CSVLogger logging hyperparameter at every write which increases latency (#20594)
  • Fixed OverflowError when resuming from checkpoint with an iterable dataset (#20565)
  • Fixed swapped _R_co and _P to prevent type error (#20508)
  • Always call WandbLogger.experiment first in _call_setup_hook to ensure tensorboard logs can sync to wandb (#20610)
  • Fixed TBPTT example (#20528)
  • Fixed test compatibility as AdamW became a subclass of Adam (#20574)
  • Fixed file extension of model checkpoints uploaded by NeptuneLogger (#20581)
  • Reset trainer variable should_stop when fit is called (#19177)
  • Fixed making WandbLogger upload models from all ModelCheckpoint callbacks, not just one (#20191)
  • Error when logging to MLFlow deleted experiment (#20556)

Lightning Fabric

Changed
  • Added logging support for a list of dicts without collapsing to a single key (#19957)
  • bump: testing with latest torch 2.6 (#20509)
Removed
  • Removed legacy support for lightning run model; use fabric run instead. (#20588)

Full commit list: 2.5.0 -> 2.5.1

Contributors

We thank all folks who submitted issues, features, fixes and doc changes. It's the only way we can collectively make Lightning ⚡ better for everyone, nice job!

In particular, we would like to thank the authors of the pull-requests above, in no particular order:

@benglewis, @Borda, @cgebbe, @duydl, @haifeng-jin, @japdubengsub, @justusschock, @lantiga, @mauvilsa, @millskyle, @ringohoffman, @ryan597, @senarvi, @TresYap

Thank you ❤️ and we hope you'll keep them coming!

Lightning v2.5 post0

21 Dec 01:35
9177ec0

Choose a tag to compare