Unverified Commit 701b4fcc authored by Quan (Andy) Gan's avatar Quan (Andy) Gan Committed by GitHub
Browse files

[Sampling] New sampling pipeline plus asynchronous prefetching (#3665)

* initial update

* more

* more

* multi-gpu example

* cluster gcn, finalize homogeneous

* more explanation

* fix

* bunch of fixes

* fix

* RGAT example and more fixes

* shadow-gnn sampler and some changes in unit test

* fix

* wth

* more fixes

* remove shadow+node/edge dataloader tests for possible ux changes

* lints

* add legacy dataloading import just in case

* fix

* update pylint for f-strings

* fix

* lint

* lint

* lint again

* cherry-picking commit fa9f494

* oops

* fix

* add sample_neighbors in dist_graph

* fix

* lint

* fix

* fix

* fix

* fix tutorial

* fix

* fix

* fix

* fix warning

* remove debug

* add get_foo_storage apis

* lint
parent 5152a879
...@@ -10,3 +10,4 @@ from .pinsage import * ...@@ -10,3 +10,4 @@ from .pinsage import *
from .neighbor import * from .neighbor import *
from .node2vec_randomwalk import * from .node2vec_randomwalk import *
from .negative import * from .negative import *
from . import utils
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
from numpy.polynomial import polynomial from numpy.polynomial import polynomial
from .._ffi.function import _init_api from .._ffi.function import _init_api
from .. import backend as F from .. import backend as F
from .. import utils
from ..heterograph import DGLHeteroGraph
__all__ = [ __all__ = [
'global_uniform_negative_sampling'] 'global_uniform_negative_sampling']
...@@ -99,5 +101,7 @@ def global_uniform_negative_sampling( ...@@ -99,5 +101,7 @@ def global_uniform_negative_sampling(
src, dst = _CAPI_DGLGlobalUniformNegativeSampling( src, dst = _CAPI_DGLGlobalUniformNegativeSampling(
g._graph, etype_id, num_samples, 3, exclude_self_loops, replace, redundancy) g._graph, etype_id, num_samples, 3, exclude_self_loops, replace, redundancy)
return F.from_dgl_nd(src), F.from_dgl_nd(dst) return F.from_dgl_nd(src), F.from_dgl_nd(dst)
DGLHeteroGraph.global_uniform_negative_sampling = utils.alias_func(
global_uniform_negative_sampling)
_init_api('dgl.sampling.negative', __name__) _init_api('dgl.sampling.negative', __name__)
This diff is collapsed.
This diff is collapsed.
"""Feature storage classes for DataLoading"""
from .. import backend as F
from .base import *
from .numpy import *
if F.get_preferred_backend() == 'pytorch':
from .pytorch_tensor import *
else:
from .tensor import *
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment