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
8a221643
Commit
8a221643
authored
Nov 23, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix horovod import in rtd
parent
cc2df915
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
docs/conf.py
docs/conf.py
+1
-1
tensorpack/train/trainers.py
tensorpack/train/trainers.py
+4
-1
No files found.
docs/conf.py
View file @
8a221643
...
...
@@ -30,7 +30,7 @@ MOCK_MODULES = ['scipy', 'tabulate',
'cv2'
,
'scipy.io'
,
'dill'
,
'zmq'
,
'subprocess32'
,
'lmdb'
,
'tornado.concurrent'
,
'tornado'
,
'msgpack'
,
'msgpack_numpy'
,
'gym'
,
'functools32'
,
'horovod.tensorflow'
]
'gym'
,
'functools32'
,
'horovod
'
,
'horovod
.tensorflow'
]
for
mod_name
in
MOCK_MODULES
:
sys
.
modules
[
mod_name
]
=
mock
.
Mock
(
name
=
mod_name
)
sys
.
modules
[
'cv2'
]
.
__version__
=
'3.2.1'
# fake version
...
...
tensorpack/train/trainers.py
View file @
8a221643
...
...
@@ -268,5 +268,8 @@ class HorovodTrainer(SingleCostTrainer):
from
..utils.develop
import
create_dummy_class
# noqa
try
:
import
horovod.tensorflow
as
hvd
except
Exception
:
# could be other than ImportError, e.g. NCCL not found
except
ImportError
:
HorovodTrainer
=
create_dummy_class
(
'HovorodTrainer'
,
'horovod'
)
# noqa
except
Exception
:
# could be other than ImportError, e.g. NCCL not found
print
(
"Horovod is installed but cannot be imported."
)
HorovodTrainer
=
create_dummy_class
(
'HovorodTrainer'
,
'horovod'
)
# noqa
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