Commit 8b487b90 authored by Yuxin Wu's avatar Yuxin Wu

Fix missing global. Update git hooks.

parent 875f4d7d
......@@ -8,6 +8,8 @@ so you won't need to look at here very often.
Here are a list of things that were changed, starting from an early version.
TensorFlow itself also changed APIs before 1.0 and those are not listed here.
+ [2017/08/02](https://github.com/ppwwyyxx/tensorpack/commit/875f4d7dbb5675f54eae5675fa3a0948309a8465).
`Trainer.get_predictor` now takes GPU id. And `Trainer.get_predictors` was deprecated.
+ 2017/06/07. Now the library explicitly depends on msgpack-numpy>=0.3.9. The serialization protocol
becomes incompatible if you've been using <0.3.9.
+ [2017/05/06](https://github.com/ppwwyyxx/tensorpack/commit/0774ec66e66075486f6a36aba63cc2a151b9fec8).
......
......@@ -208,6 +208,7 @@ class MySimulatorMaster(SimulatorMaster, Callback):
def get_config():
nr_gpu = get_nr_gpu()
global PREDICTOR_THREAD
if nr_gpu > 0:
if nr_gpu > 1:
# use half gpus for inference
......
......@@ -5,8 +5,9 @@ cd examples
GIT_ARG="--git-dir ../.git --work-tree .."
# find out modified python files, so that we ignored unstaged files
MOD=$(git $GIT_ARG status -s | grep -E '\.py$' | grep -E '^ *M|^ *A ' | cut -c 4-)
# git $GIT_ARG status -s | grep -E '\.py$'
# exclude ../docs
MOD=$(git $GIT_ARG status -s | grep -E '\.py$' \
| grep -E '^\b+M\b+' | cut -c 4- | grep -v '../docs')
if [[ -n $MOD ]]; then
flake8 $MOD
fi
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