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
341dbea0
Unverified
Commit
341dbea0
authored
Mar 19, 2019
by
Quan (Andy) Gan
Committed by
GitHub
Mar 19, 2019
Browse files
[Bug] Fix unused prefetch switch for NeighborSampler and LayerSampler (#457)
* forgot prefetch switch * yet another stupid bug
parent
33b9c383
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
python/dgl/contrib/sampling/sampler.py
python/dgl/contrib/sampling/sampler.py
+3
-3
No files found.
python/dgl/contrib/sampling/sampler.py
View file @
341dbea0
...
@@ -165,7 +165,7 @@ class NodeFlowSampler(object):
...
@@ -165,7 +165,7 @@ class NodeFlowSampler(object):
if
num_prefetch
:
if
num_prefetch
:
self
.
_prefetching_wrapper_class
=
prefetching_wrapper_class
self
.
_prefetching_wrapper_class
=
prefetching_wrapper_class
self
.
_num_prefetch
=
num_prefetch
self
.
_num_prefetch
=
num_prefetch
def
fetch
(
self
,
current_nodeflow_index
):
def
fetch
(
self
,
current_nodeflow_index
):
'''
'''
...
@@ -295,7 +295,7 @@ class NeighborSampler(NodeFlowSampler):
...
@@ -295,7 +295,7 @@ class NeighborSampler(NodeFlowSampler):
prefetch
=
False
,
prefetch
=
False
,
add_self_loop
=
False
):
add_self_loop
=
False
):
super
(
NeighborSampler
,
self
).
__init__
(
super
(
NeighborSampler
,
self
).
__init__
(
g
,
batch_size
,
seed_nodes
,
shuffle
,
num_workers
*
2
,
g
,
batch_size
,
seed_nodes
,
shuffle
,
num_workers
*
2
if
prefetch
else
0
,
ThreadPrefetchingWrapper
)
ThreadPrefetchingWrapper
)
assert
node_prob
is
None
,
'non-uniform node probability not supported'
assert
node_prob
is
None
,
'non-uniform node probability not supported'
...
@@ -361,7 +361,7 @@ class LayerSampler(NodeFlowSampler):
...
@@ -361,7 +361,7 @@ class LayerSampler(NodeFlowSampler):
num_workers
=
1
,
num_workers
=
1
,
prefetch
=
False
):
prefetch
=
False
):
super
(
LayerSampler
,
self
).
__init__
(
super
(
LayerSampler
,
self
).
__init__
(
g
,
batch_size
,
seed_nodes
,
shuffle
,
num_workers
*
2
,
g
,
batch_size
,
seed_nodes
,
shuffle
,
num_workers
*
2
if
prefetch
else
0
,
ThreadPrefetchingWrapper
)
ThreadPrefetchingWrapper
)
assert
node_prob
is
None
,
'non-uniform node probability not supported'
assert
node_prob
is
None
,
'non-uniform node probability not supported'
...
...
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