Skip to content

Commit

Permalink
Merge pull request #966 from vdumoulin/update_progressbar
Browse files Browse the repository at this point in the history
Update progressbar2 required version, fix maxval bug and make sure te…
  • Loading branch information
vdumoulin committed Jan 29, 2016
2 parents b7a7805 + 6835428 commit d9930cd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion blocks/extensions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def create_bar(self):
progressbar.Timer(), ' ', progressbar.ETA()]

return progressbar.ProgressBar(widgets=widgets,
maxval=iter_per_epoch)
max_value=iter_per_epoch)

def before_epoch(self):
self.iter_count = 0
Expand Down
2 changes: 1 addition & 1 deletion req-rtd.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
picklable-itertools==0.1.1
progressbar2==2.7.3
progressbar2==3.6.0
pyyaml==3.11
six==1.9.0
toolz==0.7.2
Expand Down
2 changes: 1 addition & 1 deletion req-travis-pip.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
coveralls==1.0
nose2[coverage-plugin]==0.5.0
picklable-itertools==0.1.1
progressbar2==2.7.3
progressbar2==3.6.0

--allow-external theano
--allow-unverified theano
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
numpy==1.9.3
picklable-itertools==0.1.1
progressbar2==2.7.3
progressbar2==3.6.0
pyyaml==3.11
six==1.9.0
toolz==0.7.2
Expand Down
6 changes: 5 additions & 1 deletion tests/extensions/test_progressbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ def setup_mainloop(extension):
DataStream and a minimal model/cost to optimize.
"""
# Since progressbar2 3.6.0, the `maxval` kwarg has been replaced by
# `max_value`, which has a default value of 100. If we're still using
# `maxval` by accident, this test should fail complaining that
# the progress bar has received a value out of range.
features = [numpy.array(f, dtype=theano.config.floatX)
for f in [[1, 2], [3, 4], [5, 6]]]
for f in [[1, 2]] * 101]
dataset = IterableDataset(dict(features=features))

W = shared_floatx([0, 0], name='W')
Expand Down

0 comments on commit d9930cd

Please sign in to comment.