Skip to content

[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
Assets 2

@ethanwharris ethanwharris released this Sep 17, 2019 · 3 commits to master since this release

[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
Assets 2

@ethanwharris ethanwharris released this May 28, 2019

[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
Assets 2

@ethanwharris ethanwharris released this May 24, 2019

[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
Assets 2

@ethanwharris ethanwharris released this Feb 28, 2019

[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
Assets 2

@ethanwharris ethanwharris released this Feb 25, 2019 · 22 commits to release/0.2.6.1 since this release

[0.2.6.1] - 2019-02-25

Fixed

  • Fixed a bug where predictions would multiply when predict was called more than once
Assets 2

@ethanwharris ethanwharris released this Dec 19, 2018

[0.2.6] - 2018-12-19

Added

Changed

  • Y_PRED, Y_TRUE and X can now equivalently be accessed as PREDICTION, TARGET and INPUT respectively

Deprecated

Removed

Fixed

  • Fixed a bug where the LiveLossPlot callback would trigger an error if run and evaluate were called separately
  • Fixed a bug where state key errors would report to the wrong stack level
  • Fixed a bug where the user would wrongly get a state key error in some cases
Assets 2

@ethanwharris ethanwharris released this Dec 19, 2018

[0.2.5] - 2018-12-19

Added

  • Added flag to replay to replay only a single batch per epoch
  • Added support for PyTorch 1.0.0 and Python 3.7
  • MetricTree can now unpack dictionaries from root, this is useful if you want to get a mean of a metric. However, this should be used with caution as it extracts only the first value in the dict and ignores the rest.
  • Added a callback for the livelossplot visualisation tool for notebooks

Changed

  • All error / accuracy metrics can now optionally take state keys for predictions and targets as arguments

Deprecated

Removed

Fixed

  • Fixed a bug with the EpochLambda metric which required y_true / y_pred to have specific forms
Assets 2

@ethanwharris ethanwharris released this Nov 16, 2018

[0.2.4] - 2018-11-16

Added

  • Added metric functionality to state keys so that they can be used as metrics if desired
  • Added customizable precision to the printer callbacks
  • Added threshold to binary accuracy. Now it will appropriately handle any values in [0, 1]

Changed

  • Changed the default printer precision to 4s.f.
  • Tqdm on_epoch now shows metrics immediately when resuming

Deprecated

Removed

Fixed

  • Fixed a bug which would incorrectly trigger version warnings when loading in models
  • Fixed bugs where the Trial would not fail gracefully if required objects were not in state
  • Fixed a bug where none criterion didn't work with the add_to_loss callback
  • Fixed a bug where tqdm on_epoch always started at 0
Assets 2

@ethanwharris ethanwharris released this Oct 12, 2018

[0.2.3] - 2018-10-12

Added

  • Added string representation of Trial to give summary
  • Added option to log Trial summary to TensorboardText
  • Added a callback point ('on_checkpoint') which can be used for model checkpointing after the history ios updated

Changed

  • When resuming training checkpointers no longer delete the state file the trial was loaded from
  • Changed the metric eval to include a data_key which tells us what data we are evaluating on

Deprecated

Removed

Fixed

  • Fixed a bug where callbacks weren't handled correctly in the predict and evaluate methods of Trial
  • Fixed a bug where the history wasn't updated when new metrics were calculated with the evaluate method of Trial
  • Fixed a bug where tensorboard writers couldn't be reused
  • Fixed a bug where the none criterion didn't require gradient
  • Fix bug where tqdm wouldn't get correct iterator length when evaluating on test generator
  • Fixed a bug where evaluating before training tried to update history before it existed
  • Fixed a bug where the metrics would output 'val_acc' even if evaluating on test or train data
  • Fixed a bug where roc metric didn't detach y_pred before sending to numpy
  • Fixed a bug where resuming from a checkpoint saved with one of the callbacks didn't populate the epoch number correctly
Assets 2
You can’t perform that action at this time.