Skip to content

Commit

Permalink
Fix for WG import
Browse files Browse the repository at this point in the history
  • Loading branch information
chang-l committed Jun 7, 2024
1 parent 968371b commit c9654fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/graphstorm/wholegraph/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def is_wholegraph_embedding(data):
is required to use wholegraph framework.
"""
try:
import pylibwholegraph
import pylibwholegraph.torch
return isinstance(data, pylibwholegraph.torch.WholeMemoryEmbedding)
except ImportError:
return False
Expand All @@ -33,7 +33,7 @@ def is_wholegraph_embedding_module(data):
is required to use wholegraph framework.
"""
try:
import pylibwholegraph
import pylibwholegraph.torch
return isinstance(data, pylibwholegraph.torch.WholeMemoryEmbeddingModule)
except: # pylint: disable=bare-except
return False
Expand All @@ -44,7 +44,7 @@ def is_wholegraph_optimizer(data):
is required to use wholegraph framework.
"""
try:
import pylibwholegraph
import pylibwholegraph.torch
return isinstance(data, pylibwholegraph.torch.WholeMemoryOptimizer)
except: # pylint: disable=bare-except
return False
Expand Down

0 comments on commit c9654fe

Please sign in to comment.