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
b81bb914
Unverified
Commit
b81bb914
authored
Oct 15, 2021
by
Quan (Andy) Gan
Committed by
GitHub
Oct 15, 2021
Browse files
[Bug] Fix edge exclusion still not working for full neighbor sampling (#3424)
parent
4f5c3aa2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
python/dgl/dataloading/dataloader.py
python/dgl/dataloading/dataloader.py
+1
-1
python/dgl/dataloading/neighbor.py
python/dgl/dataloading/neighbor.py
+4
-0
No files found.
python/dgl/dataloading/dataloader.py
View file @
b81bb914
...
@@ -386,7 +386,7 @@ class BlockSampler(object):
...
@@ -386,7 +386,7 @@ class BlockSampler(object):
# Removing edges from the frontier for link prediction training falls
# Removing edges from the frontier for link prediction training falls
# into the category of frontier postprocessing
# into the category of frontier postprocessing
if
not
self
.
exclude_edges_in_frontier
:
if
not
self
.
exclude_edges_in_frontier
(
g
)
:
eid_excluder
=
_create_eid_excluder
(
exclude_eids
,
self
.
output_device
)
eid_excluder
=
_create_eid_excluder
(
exclude_eids
,
self
.
output_device
)
if
eid_excluder
is
not
None
:
if
eid_excluder
is
not
None
:
frontier
=
eid_excluder
(
frontier
)
frontier
=
eid_excluder
(
frontier
)
...
...
python/dgl/dataloading/neighbor.py
View file @
b81bb914
...
@@ -165,3 +165,7 @@ class MultiLayerFullNeighborSampler(MultiLayerNeighborSampler):
...
@@ -165,3 +165,7 @@ class MultiLayerFullNeighborSampler(MultiLayerNeighborSampler):
"""
"""
def
__init__
(
self
,
n_layers
,
return_eids
=
False
):
def
__init__
(
self
,
n_layers
,
return_eids
=
False
):
super
().
__init__
([
None
]
*
n_layers
,
return_eids
=
return_eids
)
super
().
__init__
([
None
]
*
n_layers
,
return_eids
=
return_eids
)
@
classmethod
def
exclude_edges_in_frontier
(
cls
,
g
):
return
False
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