Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
b03d70d3
"...en/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "1ccbfbb663399d3aa363af513e5a8352f3afdb35"
Unverified
Commit
b03d70d3
authored
Jun 04, 2023
by
peizhou001
Committed by
GitHub
Jun 04, 2023
Browse files
[Graphbolt] Add fanout check (#5776)
parent
95cf6924
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
python/dgl/graphbolt/graph_storage/csc_sampling_graph.py
python/dgl/graphbolt/graph_storage/csc_sampling_graph.py
+4
-0
No files found.
python/dgl/graphbolt/graph_storage/csc_sampling_graph.py
View file @
b03d70d3
...
@@ -269,6 +269,10 @@ class CSCSamplingGraph:
...
@@ -269,6 +269,10 @@ class CSCSamplingGraph:
(
fanouts
>=
0
)
|
(
fanouts
==
-
1
)
(
fanouts
>=
0
)
|
(
fanouts
==
-
1
)
),
"Fanouts should consist of values that are either -1 or
\
),
"Fanouts should consist of values that are either -1 or
\
greater than or equal to 0."
greater than or equal to 0."
if
self
.
metadata
and
self
.
metadata
.
edge_type_to_id
:
assert
len
(
self
.
metadata
.
edge_type_to_id
)
==
fanouts
.
size
(
0
),
"Fanouts should have the same number of elements as etypes."
return
self
.
_c_csc_graph
.
sample_neighbors
(
return
self
.
_c_csc_graph
.
sample_neighbors
(
nodes
,
fanouts
.
tolist
(),
replace
,
return_eids
nodes
,
fanouts
.
tolist
(),
replace
,
return_eids
)
)
...
...
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