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
9c2e2226
Commit
9c2e2226
authored
Nov 22, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix horovod trainer
parent
69e17d85
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
tensorpack/train/trainers.py
tensorpack/train/trainers.py
+3
-2
tensorpack/utils/utils.py
tensorpack/utils/utils.py
+1
-0
No files found.
tensorpack/train/trainers.py
View file @
9c2e2226
...
@@ -229,9 +229,10 @@ class HorovodTrainer(SingleCostTrainer):
...
@@ -229,9 +229,10 @@ class HorovodTrainer(SingleCostTrainer):
opt
=
get_opt_fn
()
opt
=
get_opt_fn
()
opt
=
hvd
.
DistributedOptimizer
(
opt
)
opt
=
hvd
.
DistributedOptimizer
(
opt
)
self
.
train_op
=
opt
.
apply_gradients
(
grads
,
name
=
'min_op'
)
self
.
train_op
=
opt
.
apply_gradients
(
grads
,
name
=
'min_op'
)
with
tf
.
name_scope
(
'horovod_broadcast'
):
op
=
hvd
.
broadcast_global_variables
(
0
)
cb
=
RunOp
(
cb
=
RunOp
(
tf
.
identity
(
hvd
.
broadcast_global_variables
(
0
),
name
=
'horovod_broadcast_global_variables'
),
op
,
run_before
=
True
,
run_before
=
True
,
run_as_trigger
=
False
,
verbose
=
True
)
run_as_trigger
=
False
,
verbose
=
True
)
cb
.
chief_only
=
False
cb
.
chief_only
=
False
return
[
cb
]
return
[
cb
]
...
...
tensorpack/utils/utils.py
View file @
9c2e2226
...
@@ -114,6 +114,7 @@ def get_tqdm_kwargs(**kwargs):
...
@@ -114,6 +114,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
# 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
:
...
...
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