Skip to content

Commit 7d5febc

Browse files
ShiboXingShibo Xing
andauthored
fix: remove horovod.pytorch import, preventing segfault with rubik (#660)
* fix: remove horovod.pytorch import, preventing segfault with rubik * refactor: bump up version --------- Co-authored-by: Shibo Xing <shibox@amazon.com>
1 parent 8887b3c commit 7d5febc

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

smdebug/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.33"
1+
__version__ = "1.0.34"

smdebug/core/utils.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,15 @@ class FRAMEWORK(Enum):
6161

6262

6363
try:
64-
import horovod.torch as hvd
65-
66-
# This redundant import is necessary because horovod does not raise an ImportError if the library is not present
67-
import torch # noqa
64+
import horovod.tensorflow as hvd
6865

6966
_hvd_imported = hvd
7067
except (ModuleNotFoundError, ImportError):
71-
try:
72-
import horovod.tensorflow as hvd
68+
_hvd_imported = None
69+
except Exception as e:
70+
raise SMDebugError(e)
71+
7372

74-
_hvd_imported = hvd
75-
except (ModuleNotFoundError, ImportError):
76-
_hvd_imported = None
7773

7874

7975
logger = get_logger()

0 commit comments

Comments
 (0)