Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
8b487b90
Commit
8b487b90
authored
Aug 02, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix missing global. Update git hooks.
parent
875f4d7d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
CHANGES.md
CHANGES.md
+2
-0
examples/A3C-Gym/train-atari.py
examples/A3C-Gym/train-atari.py
+1
-0
tests/dev/git-hooks/pre-commit
tests/dev/git-hooks/pre-commit
+3
-2
No files found.
CHANGES.md
View file @
8b487b90
...
...
@@ -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
)
.
...
...
examples/A3C-Gym/train-atari.py
View file @
8b487b90
...
...
@@ -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
...
...
tests/dev/git-hooks/pre-commit
View file @
8b487b90
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment