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 *
from .neighbor import *
from .node2vec_randomwalk import *
from .negative import *
from . import utils
......@@ -3,6 +3,8 @@
from numpy.polynomial import polynomial
from .._ffi.function import _init_api
from .. import backend as F
from .. import utils
from ..heterograph import DGLHeteroGraph
__all__ = [
'global_uniform_negative_sampling']
......@@ -99,5 +101,7 @@ def global_uniform_negative_sampling(
src, dst = _CAPI_DGLGlobalUniformNegativeSampling(
g._graph, etype_id, num_samples, 3, exclude_self_loops, replace, redundancy)
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__)
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.
......@@ -4,3 +4,4 @@ from .data import *
from .checks import *
from .shared_mem import *
from .filter import *
from .exception import *
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -594,3 +594,6 @@ def test_khop_out_subgraph(idtype):
assert edge_set == {(0, 1)}
assert F.array_equal(F.astype(inv['user'], idtype), F.tensor([0], idtype))
assert F.array_equal(F.astype(inv['game'], idtype), F.tensor([0], idtype))
if __name__ == '__main__':
test_khop_out_subgraph(F.int64)
......@@ -2308,3 +2308,4 @@ def test_module_add_edge(idtype):
if __name__ == '__main__':
test_partition_with_halo()
test_module_heat_kernel(F.int32)
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