Skip to content

Commit

Permalink
Rename bink -> torchbearer (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanwharris authored and MattPainter01 committed Jul 18, 2018
1 parent ed3c8ef commit 17d90be
Show file tree
Hide file tree
Showing 53 changed files with 705 additions and 718 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ install:
- python setup.py develop
# command to run tests
script:
- nosetests tests -v --with-coverage --cover-package=bink
- nosetests tests -v --with-coverage --cover-package=torchbearer
after_success:
- bash <(curl -s https://codecov.io/bash)
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Changed the order of the arguments to the lambda function in the EpochLambda metric for consistency with pytorch and other metrics
- Checkpointers now create directory to savepath if it doesn't exist
- Changed the 'on_forward_criterion' callback method to 'on_criterion'
- Changed epoch number in printer callbacks to be consistent with the rest of bink
- Changed epoch number in printer callbacks to be consistent with the rest of torchbearer
### Deprecated
### Removed
### Fixed
Expand All @@ -24,8 +24,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [0.1.2] - 2018-06-08
### Added
- Added support for tuple outputs from generators, bink expects output to be length 2. Specifically, x, y = next() is possible, where x and y can be tuples of arbitrary size or depth
- Added support for torch dtypes in bink Model.to(...)
- Added support for tuple outputs from generators, torchbearer expects output to be length 2. Specifically, x, y = next() is possible, where x and y can be tuples of arbitrary size or depth
- Added support for torch dtypes in torchbearer Model.to(...)
- Added pickle_module and pickle_protocol to checkpointers for consistency with torch.save
### Changed
- Changed the learning rate scheduler callbacks to no longer require an optimizer and to have the proper arguments
Expand Down
6 changes: 3 additions & 3 deletions Example/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
from torch.utils.data import DataLoader

from Example import inception_network as nm
from bink import Model
from bink.metrics import RocAucScore
from bink.callbacks import EarlyStopping, TensorBoard, L2WeightDecay, L1WeightDecay
from torchbearer import Model
from torchbearer.metrics import RocAucScore
from torchbearer.callbacks import EarlyStopping, TensorBoard, L2WeightDecay, L1WeightDecay

####### Paths #######
dataset_path = '/home/matt/datasets/cifar'
Expand Down
13 changes: 0 additions & 13 deletions Jenkinsfile

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# PyBink
# torchbearer

[![Build Status](https://travis-ci.com/ecs-vlc/PyBink.svg?branch=master)](https://travis-ci.com/ecs-vlc/PyBink) [![codecov](https://codecov.io/gh/ecs-vlc/PyBink/branch/master/graph/badge.svg)](https://codecov.io/gh/ecs-vlc/PyBink) [![Documentation Status](https://readthedocs.org/projects/pybink/badge/?version=latest)](https://pybink.readthedocs.io/en/latest/?badge=latest)
[![Build Status](https://travis-ci.com/ecs-vlc/torchbearer.svg?branch=master)](https://travis-ci.com/ecs-vlc/torchbearer) [![codecov](https://codecov.io/gh/ecs-vlc/torchbearer/branch/master/graph/badge.svg)](https://codecov.io/gh/ecs-vlc/torchbearer) [![Documentation Status](https://readthedocs.org/projects/pytorchbearer/badge/?version=latest)](https://pytorchbearer.readthedocs.io/en/latest/?badge=latest)

bink: A model training library for researchers using PyTorch
torchbearer: A model training library for researchers using PyTorch
4 changes: 2 additions & 2 deletions docs/code/callbacks.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
bink.callbacks
torchbearer.callbacks
====================================

.. automodule:: bink.callbacks
.. automodule:: torchbearer.callbacks
:members:
:undoc-members:
4 changes: 2 additions & 2 deletions docs/code/main.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
bink
torchbearer
====================================

.. automodule:: bink
.. automodule:: torchbearer
:members:
:undoc-members:
4 changes: 2 additions & 2 deletions docs/code/metrics.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
bink.metrics
torchbearer.metrics
====================================

.. automodule:: bink.metrics
.. automodule:: torchbearer.metrics
:members:
:undoc-members:
14 changes: 7 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# PyBink documentation build configuration file, created by
# torchbearer documentation build configuration file, created by
# sphinx-quickstart on Mon Jul 16 14:35:09 2018.
#
# This file is execfile()d with the current directory set to its
Expand Down Expand Up @@ -59,7 +59,7 @@ def __getattr__(cls, name):
master_doc = 'index'

# General information about the project.
project = 'PyBink'
project = 'torchbearer'
copyright = '2018, Ethan Harris and Matthew Painter'
author = 'Ethan Harris and Matthew Painter'

Expand Down Expand Up @@ -128,7 +128,7 @@ def __getattr__(cls, name):
# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'PyBinkdoc'
htmlhelp_basename = 'torchbearerdoc'


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -155,7 +155,7 @@ def __getattr__(cls, name):
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'PyBink.tex', 'PyBink Documentation',
(master_doc, 'torchbearer.tex', 'torchbearer Documentation',
'Ethan Harris and Matthew Painter', 'manual'),
]

Expand All @@ -165,7 +165,7 @@ def __getattr__(cls, name):
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'pybink', 'PyBink Documentation',
(master_doc, 'pytorchbearer', 'torchbearer Documentation',
[author], 1)
]

Expand All @@ -176,8 +176,8 @@ def __getattr__(cls, name):
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'PyBink', 'PyBink Documentation',
author, 'PyBink', 'One line description of project.',
(master_doc, 'torchbearer', 'torchbearer Documentation',
author, 'torchbearer', 'One line description of project.',
'Miscellaneous'),
]

Expand Down
6 changes: 3 additions & 3 deletions docs/examples/quickstart.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
Quickstart Guide
====================================

This guide will give a quick intro to training PyTorch models with PyBink. We'll start by loading in some data and defining a model, then we'll train it for a few epochs and see how well it does.
This guide will give a quick intro to training PyTorch models with torchbearer. We'll start by loading in some data and defining a model, then we'll train it for a few epochs and see how well it does.

Defining the Model
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Let's get using bink. Here's some data from Cifar10 and a simple 3 layer strided CNN:
Let's get using torchbearer. Here's some data from Cifar10 and a simple 3 layer strided CNN:

.. literalinclude:: ../../examples/quickstart.py
:language: python
:lines: 7-45

Typically we would need a training loop and a series of calls to backward, step etc.
Instead, with bink, we can define our optimiser and some metrics (just 'acc' and 'loss' for now) and let it do the work.
Instead, with torchbearer, we can define our optimiser and some metrics (just 'acc' and 'loss' for now) and let it do the work.

Training on Cifar10
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. PyBink documentation master file, created by
.. torchbearer documentation master file, created by
sphinx-quickstart on Mon Jul 16 14:35:09 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to PyBink's documentation!
Welcome to torchbearer's documentation!
====================================

.. toctree::
Expand Down
6 changes: 3 additions & 3 deletions examples/quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def forward(self, x):
optimizer = optim.Adam(filter(lambda p: p.requires_grad, model.parameters()), lr=0.001)
loss = nn.CrossEntropyLoss()

from bink import Model
from torchbearer import Model

bink_model = Model(model, optimizer, loss, metrics=['acc', 'loss']).to('cuda')
bink_model.fit_generator(traingen, epochs=10, validation_generator=testgen)
torchbearer_model = Model(model, optimizer, loss, metrics=['acc', 'loss']).to('cuda')
torchbearer_model.fit_generator(traingen, epochs=10, validation_generator=testgen)
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from setuptools import setup

setup(
name='bink',
name='torchbearer',
version='0.1.3',
packages=['bink', 'bink.metrics', 'bink.callbacks', 'tests', 'tests.metrics', 'tests.callbacks'],
url='https://github.com/ecs-vlc/PyBink',
download_url='https://github.com/ecs-vlc/PyBink/archive/v0.1.3.tar.gz',
packages=['torchbearer', 'torchbearer.metrics', 'torchbearer.callbacks', 'tests', 'tests.metrics', 'tests.callbacks'],
url='https://github.com/ecs-vlc/torchbearer',
download_url='https://github.com/ecs-vlc/torchbearer/archive/v0.1.3.tar.gz',
license='GPL-3.0',
author='Matt Painter',
author_email='mp2u16@ecs.soton.ac.uk',
Expand Down
2 changes: 1 addition & 1 deletion tests/callbacks/test_callbacks.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from unittest import TestCase
from unittest.mock import MagicMock

from bink.callbacks import CallbackList
from torchbearer.callbacks import CallbackList


class TestCallbackList(TestCase):
Expand Down

0 comments on commit 17d90be

Please sign in to comment.