mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-21 13:20:08 +08:00
25 KiB
25 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
[unreleased] - YYYY-MM-DD
Added
- Added support for hierarchical
dict(#1152) - Added
TrainsLoggerclass (#1122) - Added type hints to
pytorch_lightning.core(#946) - Added support for
IterableDatasetin validation and testing (#1104) - Added support for non-primitive types in
hparamsforTensorboardLogger(#1130) - Added a check that stops the training when loss or weights contain
NaNorinfvalues. (#1097)
Changed
Deprecated
- Deprecated Trainer argument
print_nan_grads(#1097)
Removed
- Removed duplicated module
pytorch_lightning.utilities.arg_parsefor loading CLI arguments (#1167)
Fixed
- Fixed bug related to type checking of
ReduceLROnPlateaulr schedulers(#1114) - Fixed a bug to ensure lightning checkpoints to be backward compatible (#1132)
- Fixed all warnings and errors in the docs build process (#1191)
[0.7.1] - 2020-03-07
Fixed
- Fixes
printissues anddata_loader(#1080)
[0.7.0] - 2020-03-06
Added
- Added automatic sampler setup. Depending on DDP or TPU, lightning configures the sampler correctly (user needs to do nothing) (#926)
- Added
reload_dataloaders_every_epoch=Falseflag for trainer. Some users require reloading data every epoch (#926) - Added
progress_bar_refresh_rate=50flag for trainer. Throttle refresh rate on notebooks (#926) - Updated governance docs
- Added a check to ensure that the metric used for early stopping exists before training commences (#542)
- Added
optimizer_idxargument tobackwardhook (#733) - Added
entityargument toWandbLoggerto be passed towandb.init(#783) - Added a tool for profiling training runs (#782)
- Improved flexibility for naming of TensorBoard logs, can now set
versionto astrto just save to that directory, and usename=''to prevent experiment-name directory (#804) - Added option to specify
stepkey when logging metrics (#808) - Added
train_dataloader,val_dataloaderandtest_dataloaderarguments toTrainer.fit(), for alternative data parsing (#759) - Added Tensor Processing Unit (TPU) support (#868)
- Added semantic segmentation example (#751,#876, #881)
- Split callbacks in multiple files (#849)
- Support for user defined callbacks (#889 and #950)
- Added support for multiple loggers to be passed to
Traineras an iterable (e.g. list, tuple, etc.) (#903) - Added support for step-based learning rate scheduling (#941)
- Added support for logging hparams as dict (#1029)
- Checkpoint and early stopping now work without val. step (#1041)
- Support graceful training cleanup after Keyboard Interrupt (#856, #1019)
- Added type hints for function arguments (#912, )
- Added default
argparserforTrainer(#952, #1023) - Added TPU gradient clipping (#963)
- Added max/min number of steps in
Trainer(#728)
Changed
- Improved
NeptuneLoggerby addingclose_after_fitargument to allow logging after training(#908) - Changed default TQDM to use
tqdm.autofor prettier outputs in IPython notebooks (#752) - Changed
pytorch_lightning.loggingtopytorch_lightning.loggers(#767) - Moved the default
tqdm_dictdefinition from Trainer toLightningModule, so it can be overridden by the user (#749) - Moved functionality of
LightningModule.load_from_metricsintoLightningModule.load_from_checkpoint(#995) - Changed Checkpoint path parameter from
filepathtodirpath(#1016) - Freezed models
hparamsasNamespaceproperty (#1029) - Dropped
loggingconfig in package init (#1015) - Renames model steps (#1051)
training_end>>training_epoch_endvalidation_end>>validation_epoch_endtest_end>>test_epoch_end
- Refactor dataloading, supports infinite dataloader (#955)
- Create single file in
TensorBoardLogger(#777)
Deprecated
- Deprecated
pytorch_lightning.logging(#767) - Deprecated
LightningModule.load_from_metricsin favour ofLightningModule.load_from_checkpoint(#995, #1079) - Deprecated
@data_loaderdecorator (#926) - Deprecated model steps
training_end,validation_endandtest_end(#1051, #1056)
Removed
- Removed dependency on
pandas(#736) - Removed dependency on
torchvision(#797) - Removed dependency on
scikit-learn(#801)
Fixed
- Fixed a bug where early stopping
on_end_epochwould be called inconsistently whencheck_val_every_n_epoch == 0(#743) - Fixed a bug where the model checkpointer didn't write to the same directory as the logger (#771)
- Fixed a bug where the
TensorBoardLoggerclass would create an additional empty log file during fitting (#777) - Fixed a bug where
global_stepwas advanced incorrectly when usingaccumulate_grad_batches > 1(#832) - Fixed a bug when calling
self.logger.experimentwith multiple loggers (#1009) - Fixed a bug when calling
logger.append_tagson aNeptuneLoggerwith a single tag (#1009) - Fixed sending back data from
.spawnby saving and loading the trained model in/out of the process (#1017 - Fixed port collision on DDP (#1010)
- Fixed/tested pass overrides (#918)
- Fixed comet logger to log after train (#892)
- Remove deprecated args to learning rate step function (#890)
[0.6.0] - 2020-01-21
Added
- Added support for resuming from a specific checkpoint via
resume_from_checkpointargument (#516) - Added support for
ReduceLROnPlateauscheduler (#320) - Added support for Apex mode
O2in conjunction with Data Parallel (#493) - Added option (
save_top_k) to save the top k models in theModelCheckpointclass (#128) - Added
on_train_startandon_train_endhooks toModelHooks(#598) - Added
TensorBoardLogger(#607) - Added support for weight summary of model with multiple inputs (#543)
- Added
map_locationargument toload_from_metricsandload_from_checkpoint(#625) - Added option to disable validation by setting
val_percent_check=0(#649) - Added
NeptuneLoggerclass (#648) - Added
WandbLoggerclass (#627)
Changed
- Changed the default progress bar to print to stdout instead of stderr (#531)
- Renamed
step_idxtostep,epoch_idxtoepoch,max_num_epochstomax_epochsandmin_num_epochstomin_epochs(#589) - Renamed
total_batch_nbtototal_batches,nb_val_batchestonum_val_batches,nb_training_batchestonum_training_batches,max_nb_epochstomax_epochs,min_nb_epochstomin_epochs,nb_test_batchestonum_test_batches, andnb_val_batchestonum_val_batches(#567) - Changed gradient logging to use parameter names instead of indexes (#660)
- Changed the default logger to
TensorBoardLogger(#609) - Changed the directory for tensorboard logging to be the same as model checkpointing (#706)
Deprecated
- Deprecated
max_nb_epochsandmin_nb_epochs(#567) - Deprecated the
on_sanity_check_starthook inModelHooks(#598)
Removed
- Removed the
save_best_onlyargument fromModelCheckpoint, usesave_top_k=1instead (#128)
Fixed
- Fixed a bug which ocurred when using Adagrad with cuda (#554)
- Fixed a bug where training would be on the GPU despite setting
gpus=0orgpus=[](#561) - Fixed an error with
print_nan_gradientswhen some parameters do not require gradient (#579) - Fixed a bug where the progress bar would show an incorrect number of total steps during the validation sanity check when using multiple validation data loaders (#597)
- Fixed support for PyTorch 1.1.0 (#552)
- Fixed an issue with early stopping when using a
val_check_interval < 1.0inTrainer(#492) - Fixed bugs relating to the
CometLoggerobject that would cause it to not work properly (#481) - Fixed a bug that would occur when returning
-1fromon_batch_startfollowing an early exit or when the batch wasNone(#509) - Fixed a potential race condition with several processes trying to create checkpoint directories (#530)
- Fixed a bug where batch 'segments' would remain on the GPU when using
truncated_bptt > 1(#532) - Fixed a bug when using
IterableDataset(#547) - Fixed a bug where
.itemwas called on non-tensor objects (#602) - Fixed a bug where
Trainer.trainwould crash on an uninitialized variable if the trainer was run after resuming from a checkpoint that was already atmax_epochs(#608) - Fixed a bug where early stopping would begin two epochs early (#617)
- Fixed a bug where
num_training_batchesandnum_test_batcheswould sometimes be rounded down to zero (#649) - Fixed a bug where an additional batch would be processed when manually setting
num_training_batches(#653) - Fixed a bug when batches did not have a
.copymethod (#701) - Fixed a bug when using
log_gpu_memory=Truein Python 3.6 (#715) - Fixed a bug where checkpoint writing could exit before completion, giving incomplete checkpoints (#689)
- Fixed a bug where
on_train_endwas not called when ealy stopping (#723)
[0.5.3] - 2019-11-06
Added
- Added option to disable default logger, checkpointer, and early stopping by passing
logger=False,checkpoint_callback=Falseandearly_stop_callback=Falserespectively - Added
CometLoggerfor use with Comet.ml - Added
val_check_intervalargument toTrainerallowing validition to be performed at every given number of batches - Added functionality to save and load hyperparameters using the standard checkpoint mechanism
- Added call to
torch.cuda.empty_cachebefore training starts - Added option for user to override the call t
backward - Added support for truncated backprop through time via the
truncated_bptt_stepsargument inTrainer - Added option to operate on all outputs from
training_stepin DDP2 - Added a hook for modifying DDP init
- Added a hook for modifying Apex
Changed
- Changed experiment version to be padded with zeros (e.g.
/dir/version_9becomes/dir/version_0009) - Changed callback metrics to include any metrics given in logs or progress bar
- Changed the default for
save_best_onlyinModelCheckpointtoTrue - Added
tng_data_loaderfor backwards compatibility - Renamed
MLFlowLogger.clienttoMLFlowLogger.experimentfor consistency - Moved
global_stepincrement to happen after the batch has been processed - Changed weights restore to first attempt HPC weights before restoring normally, preventing both weights being restored and running out of memory
- Changed progress bar functionality to add multiple progress bars for train/val/test
- Changed calls to
printto uselogginginstead
Deprecated
- Deprecated
tng_dataloader
Fixed
- Fixed an issue where the number of batches was off by one during training
- Fixed a bug that occured when setting a ckeckpoint callback and
early_stop_callback=False - Fixed an error when importing CometLogger
- Fixed a bug where the
gpusargument had some unexpected behaviour - Fixed a bug where the computed total number of batches was sometimes incorrect
- Fixed a bug where the progress bar would sometimes not show the total number of batches in test mode
- Fixed a bug when using the
log_gpu_memory='min_max'option inTrainer - Fixed a bug where checkpointing would sometimes erase the current directory
[0.5.2] - 2019-10-10
Added
- Added
weights_summaryargument toTrainerto be set tofull(full summary),top(just top level modules) or other - Added
tagsargument toMLFlowLogger
Changed
- Changed default for
amp_leveltoO1
Removed
- Removed the
print_weights_summaryargument fromTrainer
Fixed
- Fixed a bug where logs were not written properly
- Fixed a bug where
logger.finalizewasn't called after training is complete - Fixed callback metric errors in DDP
- Fixed a bug where
TestTubeLoggerdidn't log to the correct directory
[0.5.1] - 2019-10-05
Added
- Added the
LightningLoggerBaseclass for experiment loggers - Added
MLFlowLoggerfor logging withmlflow - Added
TestTubeLoggerfor logging withtest_tube - Added a different implementation of DDP (
distributed_backed='ddp2') where every node has one model using all GPUs - Added support for optimisers which require a closure (e.g. LBFGS)
- Added automatic
MASTER_PORTdefualt for DDP when not set manually - Added new GPU memory logging options
'min_max'(log only the min/max utilization) and'all'(log all the GPU memory)
Changed
- Changed schedulers to always be called with the current epoch
- Changed
test_tubeto an optional dependency - Changed data loaders to internally use a getter instead of a python property
- Disabled auto GPU loading when restoring weights to prevent out of memory errors
- Changed logging, early stopping and checkpointing to occur by default
Fixed
- Fixed a bug with samplers that do not specify
set_epoch - Fixed a bug when using the
MLFlowLoggerwith unsupported data types, this will now raise a warning - Fixed a bug where gradient norms were alwasy zero using
track_grad_norm - Fixed a bug which causes a crash when logging memory
[0.5.0] - 2019-09-26
Changed
- Changed
data_batchargument tobatchthroughout - Changed
batch_iargument tobatch_idxthroughout - Changed
tng_dataloadermethod totrain_dataloader - Changed
on_tng_metricsmethod toon_training_metrics - Changed
gradient_clipargument togradient_clip_val - Changed
add_log_row_intervaltorow_log_interval
Fixed
- Fixed a bug with tensorboard logging in multi-gpu setup
[0.4.9] - 2019-09-16
Added
- Added the flag
log_gpu_memorytoTrainerto deactivate logging of GPU memory utilization - Added SLURM resubmit functionality (port from test-tube)
- Added optional weight_save_path to trainer to remove the need for a checkpoint_callback when using cluster training
- Added option to use single gpu per node with
DistributedDataParallel
Changed
- Changed functionality of
validation_endandtest_endwith multiple dataloaders to be given all of the dataloaders at once rather than in seperate calls - Changed print_nan_grads to only print the parameter value and gradients when they contain NaN
- Changed gpu API to take integers as well (e.g.
gpus=2instead ofgpus=[0, 1]) - All models now loaded on to CPU to avoid device and out of memory issues in PyTorch
Fixed
- Fixed a bug where data types that implement
.tobut not.cudawould not be properly moved onto the GPU - Fixed a bug where data would not be re-shuffled every epoch when using a
DistributedSampler
[0.4.8] - 2019-08-31
Added
- Added
test_stepandtest_endmethods, used whenTrainer.testis called - Added
GradientAccumulationSchedulercallback which can be used to schedule changes to the number of accumulation batches - Added option to skip the validation sanity check by setting
nb_sanity_val_steps = 0
Fixed
- Fixed a bug when setting
nb_sanity_val_steps = 0
[0.4.7] - 2019-08-24
Changed
- Changed the default
val_check_intervalto1.0 - Changed defaults for
nb_val_batches,nb_tng_batchesandnb_test_batchesto 0
Fixed
- Fixed a bug where the full validation set as used despite setting
val_percent_check - Fixed a bug where an
Exceptionwas thrown when using a data set containing a single batch - Fixed a bug where an
Exceptionwas thrown if noval_dataloaderwas given - Fixed a bug where tuples were not properly transfered to the GPU
- Fixed a bug where data of a non standard type was not properly handled by the trainer
- Fixed a bug when loading data as a tuple
- Fixed a bug where
AttributeErrorcould be suppressed by theTrainer
[0.4.6] - 2019-08-15
Added
- Added support for data to be given as a
dictorlistwith a single gpu - Added support for
configure_optimizersto return a single optimizer, two list (optimizers and schedulers), or a single list
Fixed
- Fixed a bug where returning just an optimizer list (i.e. without schedulers) from
configure_optimizerswould throw anException
[0.4.5] - 2019-08-13
Added
- Added
optimizer_stepmethod that can be overridden to change the standard optimizer behaviour
[0.4.4] - 2019-08-12
Added
- Added supoort for multiple validation dataloaders
- Added support for latest test-tube logger (optimised for
torch==1.2.0)
Changed
validation_stepandval_dataloaderare now optionallr_scheduleris now activated after epoch
Fixed
- Fixed a bug where a warning would show when using
lr_schedulerintorch>1.1.0 - Fixed a bug where an
Exceptionwould be thrown if usingtorch.DistributedDataParallelwithout using aDistributedSampler, this now throws aWarninginstead
[0.4.3] - 2019-08-10
Fixed
- Fixed a bug where accumulate gradients would scale the loss incorrectly
[0.4.2] - 2019-08-08
Changed
- Changed install requirement to
torch==1.2.0
[0.4.1] - 2019-08-08
Changed
- Changed install requirement to
torch==1.1.0
[0.4.0] - 2019-08-08
Added
- Added 16-bit support for a single GPU
- Added support for training continuation (preserves epoch, global step etc.)
Changed
- Changed
training_stepandvalidation_step, outputs will no longer be automatically reduced
Removed
- Removed need for
Experimentobject inTrainer
Fixed
- Fixed issues with reducing outputs from generative models (such as images and text)
[0.3.6] - 2019-07-25
Added
- Added a decorator to do lazy data loading internally
Fixed
- Fixed a bug where
Experimentobject was not process safe, potentially causing logs to be overwritten