Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DeprecationWarning] Fixing the warnings appearing in test_traversal.py::test_bfs. #7484

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/dgl/graphbolt/base.py
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ def isin(elements, test_elements):

if TorchVersion(torch.__version__) >= TorchVersion("2.2.0a0"):

@torch.library.impl_abstract("graphbolt::expand_indptr")
@torch.library.register_fake("graphbolt::expand_indptr")
def expand_indptr_abstract(indptr, dtype, node_ids, output_size):
"""Abstract implementation of expand_indptr for torch.compile() support."""
if output_size is None:
2 changes: 1 addition & 1 deletion tests/python/common/test_traversal.py
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ def _bfs_nx(g_nx, src):
assert len(layers_dgl) == len(layers_nx)
assert all(toset(x) == y for x, y in zip(layers_dgl, layers_nx))

g_nx = nx.random_tree(n, seed=42)
g_nx = nx.random_labeled_tree(n, seed=42)
g = dgl.from_networkx(g_nx).astype(idtype)
src = 0
_, edges_nx = _bfs_nx(g_nx, src)