Skip to content

Releases: pytorchbearer/torchbearer

Version 0.5.5

01 Dec 18:41
64617d9
Compare
Choose a tag to compare

[0.5.5] - 2023-12-01

Changed

Deprecated

Removed

Fixed

  • Fixed versions in setup.py

Version 0.5.4

13 Nov 17:26
58aa1d2
Compare
Choose a tag to compare

[0.5.4] - 2023-11-13

Added

  • Allow imaging callback's to_file to use state information in the file name

Changed

Deprecated

Removed

Fixed

  • Fixed warnings about the epoch argument in schedulers in newer versions of pytorch
  • Fixed a bug in access metrics function and callbacks that use it
  • Fixed bug where schedulers were called before optimisers with newer versions of pytorch
  • Fixed a bug where the csv logger closed the file too early
  • Fixed compat with pytorch > 1.1.0 versioning
  • Fixed typos in doc strings
  • Fixes for tests where pytorch >2 Tensors were causing issues with mocks
  • Fix bug in gradient clipping where the parameter generator was consumed on the first pass

Version 0.5.3

31 Jan 14:07
Compare
Choose a tag to compare

[0.5.3] - 2020-01-31

Added

  • Method in bases to access metrics

Changed

Deprecated

Removed

Fixed

  • Metric access bugs in various callbacks

Version 0.5.2

28 Jan 16:14
Compare
Choose a tag to compare

[0.5.2] - 2020-28-01

Added

  • Added option to use mixup loss with cutmix
  • Support for PyTorch 1.4.0

Changed

  • Changed PyCM save methods to use *args and **kwargs

Deprecated

Removed

Fixed

  • Fixed a bug where the PyCM callback would fail when saving

Version 0.5.1

06 Nov 17:40
Compare
Choose a tag to compare

[0.5.1] - 2019-11-06

Added

  • Added BCPlus callback for between-class learning
  • Added support for PyTorch 1.3
  • Added a show flag to the ImagingCallback.to_pyplot method, set to false to stop it from calling plt.show
  • Added manifold mixup

Changed

  • Changed the default behaviour of ImagingCallback.to_pyplot to turn off the axis

Deprecated

Removed

Fixed

  • Fixed a bug when resuming an old state dict with tqdm enabled
  • Fixed a bug in imaging where passing a title to to_pyplot was not possible

Version 0.5.0

17 Sep 13:29
Compare
Choose a tag to compare

[0.5.0] - 2019-09-17

Added

  • Added PyTorch CyclicLR scheduler

Changed

  • Torchbearer now supports Modules with multiple inputs and multiple outputs

Deprecated

Removed

  • Cyclic LR callback in favour of torch cyclic lr scheduler
  • Removed support for PyTorch 0.4.x

Fixed

  • Fixed bug where aggregate predictions couldn't handle empty list
  • Fixed a bug where Runtime Errors on forward weren't handled properly
  • Fixed a bug where exceptions on forward wouldn't print the traceback properly
  • Fixed a documentation mistake whereby ReduceLROnPlateau was said to increase learning rate

Version 0.4.0

17 Sep 11:30
6dab5ca
Compare
Choose a tag to compare

[0.4.0] - 2019-07-05

Added

  • Added with_loader trial method that allows running of custom batch loaders
  • Added a Mock Model which is set when None is passed as the model to a Trial. Mock Model always returns None.
  • Added __call__(state) to StateKey so that they can now be used as losses
  • Added a callback to do cutout regularisation
  • Added a with_data trial method that allows passing of train, val and test data in one call
  • Added the missing on_init callback decorator
  • Added a step_on_batch flag to the early stopping callback
  • Added multi image support to imaging
  • Added a callback to unpack state into torchbearer.X at sample time for specified keys and update state after the forward pass based on model outputs. This is useful for using DataParallel which pass the main state dict directly.
  • Added callback for generating confusion matrices with PyCM
  • Added a mixup callback with associated loss
  • Added Label Smoothing Regularisation (LSR) callback
  • Added CutMix regularisation
  • Added default metric from paper for when Mixup loss is used

Changed

  • Changed history to now just be a list of records
  • Categorical Accuracy metric now also accepts tensors of size (B, C) and gets the max over C for the taget class

Deprecated

Removed

  • Removed the variational sub-package, this will now be packaged separately
  • Removed verbose argument from the early stopping callback

Fixed

  • Fixed a bug where list or dictionary metrics would cause the tensorboard callback to error
  • Fixed a bug where running a trial without training steps would error
  • Fixed a bug where the caching imaging callback didn't reset data so couldn't be run in multiple trials
  • Fixed a bug in the ClassAppearanceModel callback
  • Fixed a bug where the state given to predict was not a State object
  • Fixed a bug with Cutout on gpu
  • Fixed a bug where MakeGrid callback wasn't passing all arguments correctly
  • Fixed a bug in ImagingCallback that would sometimes cause make_grid to throw an error
  • Fixed a bug where the verbose argument would not work unless given as a keyword argument
  • Fixed a bug where the data_key argument would sometimes not work as expected
  • Fixed a bug where cutout required a seed
  • Fixed a bug where cutmix wasn't sendign the beta distribution sample to the device

Version 0.3.2

28 May 13:07
Compare
Choose a tag to compare

[0.3.2] - 2019-05-28

Added

Changed

Deprecated

Removed

Fixed

  • Fixed a bug where for_steps would sometimes not work as expected if called in the wrong order
  • Fixed a bug where torchbearer installed via pip would crash on import

Version 0.3.1

24 May 07:40
Compare
Choose a tag to compare

[0.3.1] - 2019-05-24

Added

  • Added cyclic learning rate finder
  • Added on_init callback hook to run at the end of trial init
  • Added callbacks for weight initialisation in torchbearer.callbacks.init
  • Added with_closure trial method that allows running of custom closures
  • Added base_closure function to bases that allows creation of standard training loop closures
  • Added ImagingCallback class for callbacks which produce images that can be sent to tensorboard, visdom or a file
  • Added CachingImagingCallback and MakeGrid callback to make a grid of images
  • Added the option to give the only_if callback decorator a function of self and state rather than just state
  • Added Layer-sequential unit-variance (LSUV) initialization
  • Added ClassAppearanceModel callback and example page for visualising CNNs
  • Added on_checkpoint callback decorator
  • Added support for PyTorch 1.1.0

Changed

  • No_grad and enable_grad decorators are now also context managers

Deprecated

Removed

  • Removed the fluent decorator, just use return self
  • Removed install dependency on torchvision, still required for some functionality

Fixed

  • Fixed bug where replay errored when train or val steps were None
  • Fixed a bug where mock optimser wouldn't call it's closure
  • Fixed a bug where the notebook check raised ModuleNotFoundError when IPython not installed
  • Fixed a memory leak with metrics that causes issues with very long epochs
  • Fixed a bug with the once and once_per_epoch decorators
  • Fixed a bug where the test criterion wouldn't accept a function of state
  • Fixed a bug where type inference would not work correctly when chaining Trial methods
  • Fixed a bug where checkpointers would error when they couldn't find the old checkpoint to overwrite
  • Fixed a bug where the 'test' label would sometimes not populate correctly in the default accuracy metric

Version 0.3.0

28 Feb 14:42
Compare
Choose a tag to compare

[0.3.0] - 2019-02-28

Added

  • Added torchbearer.variational, a sub-package for implementations of state of the art variational auto-encoders
  • Added SimpleUniform and SimpleExponential distributions
  • Added a decorator which can be used to cite a research article as part of a doc string
  • Added an optional dimension argument to the mean, std and running_mean metric aggregators
  • Added a var metric and decorator which can be used to calculate the variance of a metric
  • Added an unbiased flag to the std and var metrics to optionally not apply Bessel's correction (consistent with torch.std / torch.var)
  • Added support for rounding 1D lists to the Tqdm callback
  • Added SimpleWeibull distribution
  • Added support for Python 2.7
  • Added SimpleWeibullSimpleWeibullKL
  • Added SimpleExponentialSimpleExponentialKL
  • Added the option for model parameters only saving to Checkpointers.
  • Added documentation about serialization.
  • Added support for indefinite data loading. Iterators can now be run until complete independent of epochs or iterators can be refreshed during an epoch if complete.
  • Added support for batch intervals in interval checkpointer
  • Added line magic %torchbearer notebook
  • Added 'accuracy' variants of 'acc' default metrics

Changed

  • Changed the default behaviour of the std metric to compute the sample std, in line with torch.std
  • Tqdm precision argument now rounds to decimal places rather than significant figures
  • Trial will now simply infer if the model has an argument called 'state'
  • Torchbearer now infers if inside a notebook and will use the appropriate tqdm module if not set

Deprecated

Removed

  • Removed the old Model API (deprecated since version 0.2.0)
  • Removed the 'pass_state' argument from Trial, this will now be inferred
  • Removed the 'std' decorator from the default metrics

Fixed

  • Fixed a bug in the weight decay callback which would result in potentially negative decay (now just uses torch.norm)
  • Fixed a bug in the cite decorator causing the citation to not show up correctly
  • Fixed a memory leak in the mse primitive metric