Skip to content

Commit 76800bc

Browse files
authored
[HOTFIX] Generalize ModuleNotFoundError exception handling to ImportError for Amazon SMS libnuma.so.1 bug (#2385)
Generalize ModuleNotFoundError exception handling to ImportError for Amazon SMS libnuma.so.1 bug #2113 This allows cugraph to be imported in a SageMaker environment without having to remove `ucx-py` Authors: - Dylan Chima-Sanchez (https://github.com/betochimas) - Rick Ratzel (https://github.com/rlratzel) Approvers: - Brad Rees (https://github.com/BradReesWork)
1 parent 467a674 commit 76800bc

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

conda/recipes/libcugraph/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ requirements:
4141
- libraft-headers {{ minor_version }}.*
4242
- libcugraphops {{ minor_version }}.*
4343
- librmm {{ minor_version }}.*
44-
- cudf {{ minor_version }}.*
44+
- libcudf {{ minor_version }}.*
4545
- boost-cpp {{ boost_cpp_version }}
4646
- nccl {{ nccl_version }}
4747
- ucx-proc=*=gpu

python/cugraph/cugraph/dask/common/input_utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
from cugraph.dask.common.read_utils import MissingUCXPy
2626
try:
2727
from raft.dask.common.utils import get_client
28-
except ModuleNotFoundError as err:
29-
if err.name == "ucp":
28+
except ImportError as err:
29+
# FIXME: Generalize since err.name is arr when
30+
# libnuma.so.1 is not available
31+
if err.name == "ucp" or err.name == "arr":
3032
get_client = MissingUCXPy()
3133
else:
3234
raise

python/cugraph/cugraph/dask/common/mg_utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323
from cugraph.dask.common.read_utils import MissingUCXPy
2424
try:
2525
from raft.dask.common.utils import default_client
26-
except ModuleNotFoundError as err:
27-
if err.name == "ucp":
26+
except ImportError as err:
27+
# FIXME: Generalize since err.name is arr when
28+
# libnuma.so.1 is not available
29+
if err.name == "ucp" or err.name == "arr":
2830
default_client = MissingUCXPy()
2931
else:
3032
raise

python/cugraph/cugraph/dask/comms/comms.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
try:
1818
from raft.dask.common.comms import Comms as raftComms
1919
from raft.dask.common.comms import get_raft_comm_state
20-
except ModuleNotFoundError as err:
21-
if err.name == "ucp":
20+
except ImportError as err:
21+
# FIXME: Generalize since err.name is arr when
22+
# libnuma.so.1 is not available
23+
if err.name == "ucp" or err.name == "arr":
2224
raftComms = MissingUCXPy()
2325
get_raft_comm_state = MissingUCXPy()
2426
else:

0 commit comments

Comments
 (0)