Skip to content

Commit

Permalink
Release/0.3.0 (#518)
Browse files Browse the repository at this point in the history
* Bump to 0.3.0rc1

* Fix setup.py

* Bump to rc2

* Add accuracy version of default metrics

* Bump version number
  • Loading branch information
ethanwharris authored and MattPainter01 committed Feb 28, 2019
1 parent b19e001 commit 97c58a0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [Unreleased]
## [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
Expand All @@ -20,7 +20,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- 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 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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
setup(
name='torchbearer',
version=version_dict['__version__'],
packages=['torchbearer', 'torchbearer.metrics', 'torchbearer.callbacks', 'tests', 'tests.metrics', 'tests.callbacks'],
packages=['torchbearer', 'torchbearer.metrics', 'torchbearer.callbacks', 'torchbearer.variational', 'tests', 'tests.metrics', 'tests.callbacks', 'tests.variational'],
url='https://github.com/ecs-vlc/torchbearer',
download_url='https://github.com/ecs-vlc/torchbearer/archive/' + version_dict['__version__'] + '.tar.gz',
license='GPL-3.0',
Expand Down
8 changes: 4 additions & 4 deletions torchbearer/metrics/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
following strings:
- '`acc`' or '`accuracy`': The :class:`.DefaultAccuracy` metric
- '`binary_acc`': The :class:`.BinaryAccuracy` metric
- '`cat_acc`': The :class:`.CategoricalAccuracy` metric
- '`top_5_acc`': The :class:`.TopKCategoricalAccuracy` metric
- '`top_10_acc`': The :class:`.TopKCategoricalAccuracy` metric with k=10
- '`binary_acc`' or '`binary_accuracy`': The :class:`.BinaryAccuracy` metric
- '`cat_acc`' or '`cat_accuracy`': The :class:`.CategoricalAccuracy` metric
- '`top_5_acc`' or '`top_5_accuracy`': The :class:`.TopKCategoricalAccuracy` metric
- '`top_10_acc`' or '`top_10_accuracy`': The :class:`.TopKCategoricalAccuracy` metric with k=10
- '`mse`': The :class:`.MeanSquaredError` metric
- '`loss`': The :class:`.Loss` metric
- '`epoch`': The :class:`.Epoch` metric
Expand Down
4 changes: 4 additions & 0 deletions torchbearer/metrics/primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def super(_, obj):
return old_super(obj.__class__, obj)


@default_for_key('binary_accuracy')
@default_for_key('binary_acc')
@running_mean
@mean
Expand Down Expand Up @@ -47,6 +48,7 @@ def process(self, *args):
return torch.eq(y_pred, y_true).view(-1).float()


@default_for_key('cat_accuracy')
@default_for_key('cat_acc')
@running_mean
@mean
Expand Down Expand Up @@ -79,6 +81,8 @@ def process(self, *args):
return (y_pred == y_true).float()


@default_for_key('top_10_accuracy', k=10)
@default_for_key('top_5_accuracy')
@default_for_key('top_10_acc', k=10)
@default_for_key('top_5_acc')
@running_mean
Expand Down
2 changes: 1 addition & 1 deletion torchbearer/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.2.7.dev'
__version__ = '0.3.0'

0 comments on commit 97c58a0

Please sign in to comment.