Commit bf4d8938 authored by Yuxin Wu's avatar Yuxin Wu

Fix typo; make ParamSetter non-chief-only

parent b1c5766d
...@@ -140,7 +140,7 @@ We can also dump the dataset into one single LMDB file and read it sequentially. ...@@ -140,7 +140,7 @@ We can also dump the dataset into one single LMDB file and read it sequentially.
```python ```python
from tensorpack.dataflow import * from tensorpack.dataflow import *
class BinaryILSVRC12(dataset.ILSVRCFiles): class BinaryILSVRC12(dataset.ILSVRC12Files):
def get_data(self): def get_data(self):
for fname, label in super(BinaryILSVRC12, self).get_data(): for fname, label in super(BinaryILSVRC12, self).get_data():
with open(fname, 'rb') as f: with open(fname, 'rb') as f:
......
...@@ -112,6 +112,8 @@ class HyperParamSetter(Callback): ...@@ -112,6 +112,8 @@ class HyperParamSetter(Callback):
An abstract base callback to set hyperparameters. An abstract base callback to set hyperparameters.
""" """
_chief_only = False
def __init__(self, param): def __init__(self, param):
""" """
Args: Args:
......
...@@ -127,7 +127,7 @@ def get_tqdm_kwargs(**kwargs): ...@@ -127,7 +127,7 @@ def get_tqdm_kwargs(**kwargs):
f = kwargs.get('file', sys.stderr) f = kwargs.get('file', sys.stderr)
isatty = f.isatty() isatty = f.isatty()
# TODO when run under mpirun, isatty is always False # NOTE when run under mpirun/slurm, isatty is always False
# Jupyter notebook should be recognized as tty. # Jupyter notebook should be recognized as tty.
# Wait for https://github.com/ipython/ipykernel/issues/268 # Wait for https://github.com/ipython/ipykernel/issues/268
try: try:
...@@ -141,7 +141,7 @@ def get_tqdm_kwargs(**kwargs): ...@@ -141,7 +141,7 @@ def get_tqdm_kwargs(**kwargs):
default['mininterval'] = 0.5 default['mininterval'] = 0.5
else: else:
# If not a tty, don't refresh progress bar that often # If not a tty, don't refresh progress bar that often
default['mininterval'] = 300 default['mininterval'] = 180
default.update(kwargs) default.update(kwargs)
return default return default
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment