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
ab1b2811
"git@developer.sourcefind.cn:change/sglang.git" did not exist on "8beb356f0daada03ac99ffbbe75181e4867533c3"
Unverified
Commit
ab1b2811
authored
Jun 23, 2022
by
Rhett Ying
Committed by
GitHub
Jun 23, 2022
Browse files
[Dist] etype is not guaranteed to be sorted (#4156)
parent
4d3c01d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
python/dgl/distributed/graph_services.py
python/dgl/distributed/graph_services.py
+2
-5
No files found.
python/dgl/distributed/graph_services.py
View file @
ab1b2811
...
...
@@ -70,7 +70,7 @@ def _sample_neighbors(local_g, partition_book, seed_nodes, fan_out, edge_dir, pr
return
global_src
,
global_dst
,
global_eids
def
_sample_etype_neighbors
(
local_g
,
partition_book
,
seed_nodes
,
etype_field
,
fan_out
,
edge_dir
,
prob
,
replace
):
fan_out
,
edge_dir
,
prob
,
replace
,
etype_sorted
=
False
):
""" Sample from local partition.
The input nodes use global IDs. We need to map the global node IDs to local node IDs,
...
...
@@ -80,13 +80,10 @@ def _sample_etype_neighbors(local_g, partition_book, seed_nodes, etype_field,
"""
local_ids
=
partition_book
.
nid2localnid
(
seed_nodes
,
partition_book
.
partid
)
local_ids
=
F
.
astype
(
local_ids
,
local_g
.
idtype
)
# local_ids = self.seed_nodes
# DistGraph's edges are sorted by default according to
# graph partition mechanism.
sampled_graph
=
local_sample_etype_neighbors
(
local_g
,
local_ids
,
etype_field
,
fan_out
,
edge_dir
,
prob
,
replace
,
etype_sorted
=
True
,
_dist_training
=
True
)
etype_sorted
=
etype_sorted
,
_dist_training
=
True
)
global_nid_mapping
=
local_g
.
ndata
[
NID
]
src
,
dst
=
sampled_graph
.
edges
()
global_src
,
global_dst
=
F
.
gather_row
(
global_nid_mapping
,
src
),
\
...
...
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