Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEA] New WholeGraph Feature Store for PyG #4432

Merged
merged 138 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 124 commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
2ed2fd6
fix cosmetic issues
seunghwak Apr 3, 2024
e16c0c2
update sampling post processing functions to take additional input pa…
seunghwak Apr 4, 2024
6ac372f
Merge branch 'branch-24.06' of https://github.com/rapidsai/cugraph in…
seunghwak Apr 4, 2024
f4bcf72
fix tests for pyg 2.5
tingyu66 Apr 6, 2024
242d9ff
Merge branch 'branch-24.06' of https://github.com/rapidsai/cugraph in…
seunghwak Apr 8, 2024
e13ec05
update renumbering to consider seed vertices
seunghwak Apr 8, 2024
18e199e
update tests
seunghwak Apr 9, 2024
fd6dd23
update documentation
seunghwak Apr 9, 2024
d1bdcbb
clagn-format
seunghwak Apr 9, 2024
586899d
improve documentation & input argument checking
seunghwak Apr 10, 2024
633346b
clang-format
seunghwak Apr 10, 2024
7e40d26
Merge branch 'branch-24.06' of https://github.com/rapidsai/cugraph in…
seunghwak Apr 10, 2024
5fb39a3
bug fix in the C-API
seunghwak Apr 10, 2024
de92eca
Merge branch 'branch-24.06' of https://github.com/rapidsai/cugraph in…
seunghwak Apr 10, 2024
2de1bad
change interface to allow EdgeIndex
tingyu66 Apr 11, 2024
acd7ea0
Merge branch 'branch-24.06' into model_pyg25
tingyu66 Apr 11, 2024
98faf07
clean up
tingyu66 Apr 11, 2024
a703b39
bug fix
seunghwak Apr 11, 2024
7d27018
CI experiment
seunghwak Apr 11, 2024
8b3a5bd
compile error fix
seunghwak Apr 12, 2024
f23bdcb
Merge branch 'branch-24.06' of https://github.com/rapidsai/cugraph in…
seunghwak Apr 12, 2024
a6896c1
fix
seunghwak Apr 12, 2024
4435216
Merge branch 'branch-24.06' of https://github.com/rapidsai/cugraph in…
seunghwak Apr 12, 2024
51be4c6
return perm in helpers
tingyu66 Apr 13, 2024
e4feaa9
Merge branch 'branch-24.06' into model_pyg25
tingyu66 Apr 13, 2024
2bd47f9
Merge branch 'branch-24.06' into model_pyg25
tingyu66 Apr 15, 2024
8d209d5
CI failure fix
seunghwak Apr 15, 2024
07dcc14
Merge branch 'branch-24.06' of https://github.com/rapidsai/cugraph in…
seunghwak Apr 15, 2024
37f53af
fix tests, use _copy in tests
tingyu66 Apr 15, 2024
4285b47
C API
alexbarghi-nv Apr 17, 2024
e70ade8
resolve merge conflict
alexbarghi-nv Apr 17, 2024
d4850ee
style
alexbarghi-nv Apr 17, 2024
15dce37
pylibcugraph
alexbarghi-nv Apr 17, 2024
5243a4d
cugraph
alexbarghi-nv Apr 17, 2024
ba6ee3b
retention
alexbarghi-nv Apr 18, 2024
c01b548
fix copy bug
alexbarghi-nv Apr 18, 2024
38271f6
fixes, give up on mg support outside of pylibcugraph/dist sampler
alexbarghi-nv Apr 18, 2024
49b9083
API
alexbarghi-nv Apr 18, 2024
85f40bc
retain seeds test
alexbarghi-nv Apr 18, 2024
3708870
c
alexbarghi-nv Apr 18, 2024
cdda794
revert readme
alexbarghi-nv Apr 18, 2024
e77b43e
remove debug header
alexbarghi-nv Apr 19, 2024
9ed146f
resolve merge conflict
alexbarghi-nv Apr 19, 2024
ff4a454
first pass at new dist graph store
alexbarghi-nv Apr 19, 2024
ae82a77
pyg dist
alexbarghi-nv May 1, 2024
6a7be06
iterating over samples
alexbarghi-nv May 1, 2024
fe4d8b4
initial testing
alexbarghi-nv May 1, 2024
6050ad3
dist sampling
alexbarghi-nv May 3, 2024
7d2371f
Merge branch 'branch-24.06' into model_pyg25
tingyu66 May 7, 2024
b64f609
Merge in changes from https://github.com/rapidsai/cugraph/pull/4312
tingyu66 May 7, 2024
5c79b4f
style
tingyu66 May 7, 2024
3937342
style
tingyu66 May 7, 2024
b807185
changes to get sg example working, use CSC format
alexbarghi-nv May 7, 2024
b93d82c
deal with input mismatch, clean up mg example
alexbarghi-nv May 8, 2024
55ee4bd
fix sg reader
alexbarghi-nv May 8, 2024
38578c9
support shuffle, drop last
alexbarghi-nv May 8, 2024
92d811f
correctly calculate edge ids
alexbarghi-nv May 8, 2024
617524d
style
alexbarghi-nv May 8, 2024
d371d1d
Merge branch 'branch-24.06' into pyg-dist
alexbarghi-nv May 8, 2024
c09877a
remove tensordict from run
alexbarghi-nv May 8, 2024
c7c43c0
Merge branch 'pyg-dist' of https://github.com/alexbarghi-nv/cugraph i…
alexbarghi-nv May 8, 2024
f0e3988
dependencies.yaml
tingyu66 May 9, 2024
314ab51
Merge branch 'branch-24.06' into model_pyg25
tingyu66 May 10, 2024
71de76e
Merge branch 'branch-24.06' into model_pyg25
tingyu66 May 11, 2024
7da0889
Merge branch 'branch-24.06' into pyg-dist
nv-rliu May 13, 2024
e9ed038
Merge branch 'model_pyg25' of https://github.com/tingyu66/cugraph int…
alexbarghi-nv May 13, 2024
ce0db3d
fixes
alexbarghi-nv May 13, 2024
da40b6f
Merge branch 'branch-24.06' of https://github.com/rapidsai/cugraph in…
alexbarghi-nv May 13, 2024
b1943a7
format
tingyu66 May 14, 2024
3d19449
fix method name
alexbarghi-nv May 14, 2024
7e8e25e
Merge branch 'pyg-dist' of https://github.com/alexbarghi-nv/cugraph i…
alexbarghi-nv May 14, 2024
28efdb4
don't do expensive check
alexbarghi-nv May 14, 2024
87420a7
Merge branch 'no-expensive-check' into pyg-dist
alexbarghi-nv May 14, 2024
aed0555
revert readme
alexbarghi-nv May 14, 2024
6dc5e09
update rst
alexbarghi-nv May 14, 2024
d3f04eb
update rst
alexbarghi-nv May 14, 2024
ed28ae6
change rst format
alexbarghi-nv May 14, 2024
8d57804
propagate rename
alexbarghi-nv May 14, 2024
a5dd579
fix sg exapmle
alexbarghi-nv May 14, 2024
2a672e6
move instructions to python file
alexbarghi-nv May 14, 2024
908e246
style
alexbarghi-nv May 14, 2024
25add46
revert nx-cugraph
alexbarghi-nv May 14, 2024
b45a1a5
minor example cleanup
alexbarghi-nv May 14, 2024
c557adf
refactor tests
alexbarghi-nv May 14, 2024
e982bc6
update tests
alexbarghi-nv May 14, 2024
e9040ca
fix bad import
alexbarghi-nv May 14, 2024
903ed28
fix conflict
alexbarghi-nv May 14, 2024
e2f4e96
add basic api test
alexbarghi-nv May 14, 2024
887a7fe
feature store tests, fix
alexbarghi-nv May 14, 2024
4a33bde
wrap up tests
alexbarghi-nv May 14, 2024
0514182
Merge branch 'branch-24.06' into pyg-dist
alexbarghi-nv May 14, 2024
da2999c
resolve merge conflicts
alexbarghi-nv May 17, 2024
54ab2ac
style
alexbarghi-nv May 17, 2024
64b21be
revert nx change
alexbarghi-nv May 17, 2024
10b6ab1
Merge branch 'pyg-dist' of https://github.com/alexbarghi-nv/cugraph i…
alexbarghi-nv May 17, 2024
47c897d
rename snmg example
alexbarghi-nv May 17, 2024
72b5d76
fix sampler test
alexbarghi-nv May 17, 2024
b6492e6
initial write
alexbarghi-nv May 17, 2024
6e54068
Update gcn_dist_snmg.py
alexbarghi-nv May 17, 2024
a95cd9b
example
alexbarghi-nv May 20, 2024
08294de
Merge branch 'pyg-dist' into pyg-wg
alexbarghi-nv May 20, 2024
34c81e7
wg testing
alexbarghi-nv May 21, 2024
2b69959
finally functioning
alexbarghi-nv May 21, 2024
89e670b
reformat file
alexbarghi-nv May 21, 2024
3eab432
Merge branch 'branch-24.06' into pyg-wg
alexbarghi-nv May 21, 2024
a41c3e8
Merge branch 'branch-24.06' into pyg-dist
alexbarghi-nv May 22, 2024
e5d8a1c
style
alexbarghi-nv May 22, 2024
a880c95
Merge branch 'pyg-wg' of https://github.com/alexbarghi-nv/cugraph int…
alexbarghi-nv May 22, 2024
3f8927c
style
alexbarghi-nv May 22, 2024
e73fad5
Merge branch 'pyg-dist' of https://github.com/alexbarghi-nv/cugraph i…
alexbarghi-nv May 22, 2024
5f42437
Merge branch 'pyg-dist' into pyg-wg
alexbarghi-nv May 22, 2024
fcc309f
make sure mnmg example is skipped in ci
alexbarghi-nv May 22, 2024
867c097
style
alexbarghi-nv May 22, 2024
31090db
install tensordict in wheel test
alexbarghi-nv May 23, 2024
300edb8
install tensordict in python tests
alexbarghi-nv May 23, 2024
a53d472
Merge branch 'pyg-dist' of https://github.com/alexbarghi-nv/cugraph i…
alexbarghi-nv May 23, 2024
cf7864f
Merge branch 'pyg-dist' into pyg-wg
alexbarghi-nv May 23, 2024
509d611
update rst file
alexbarghi-nv May 23, 2024
1dac58f
don't install torch-sparse, torch-spline-conv to fix ci issue
alexbarghi-nv May 24, 2024
9dc757a
don't install torch-sparse, torch-spline-conv to fix ci issue
alexbarghi-nv May 24, 2024
d2fff15
don't call as array on 'None'
alexbarghi-nv May 24, 2024
b392727
Merge branch 'pyg-dist' into pyg-wg
alexbarghi-nv May 24, 2024
b1c9b06
Merge branch 'branch-24.06' into pyg-dist
alexbarghi-nv May 28, 2024
aad5bb2
properly skip test
alexbarghi-nv May 28, 2024
13db0c9
Merge branch 'branch-24.06' into pyg-wg
alexbarghi-nv May 28, 2024
94cc6d1
Merge branch 'branch-24.06' into pyg-dist
alexbarghi-nv May 29, 2024
0551718
clean up snmg example
alexbarghi-nv May 29, 2024
0cb3d27
Merge branch 'pyg-dist' of https://github.com/alexbarghi-nv/cugraph i…
alexbarghi-nv May 29, 2024
f79e731
fixing things
alexbarghi-nv May 29, 2024
0b2156e
skip snmg example in CI
alexbarghi-nv May 29, 2024
1cbaabb
cleanup
alexbarghi-nv May 29, 2024
987021d
actually set variable
alexbarghi-nv May 29, 2024
5999e05
Merge branch 'pyg-dist' into pyg-wg
alexbarghi-nv May 29, 2024
4f3a03a
install wg for wheels
alexbarghi-nv May 30, 2024
a80a009
merge
alexbarghi-nv May 30, 2024
cfb915a
install correct dependency
alexbarghi-nv May 30, 2024
90057e1
add pylibwholegraph test dependency
alexbarghi-nv May 30, 2024
69d9ecc
remove build dependency
alexbarghi-nv May 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/run_cugraph_pyg_pytests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -euo pipefail
# Support invoking run_cugraph_pyg_pytests.sh outside the script directory
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../python/cugraph-pyg/cugraph_pyg

pytest --cache-clear --ignore=tests/mg "$@" .
pytest --cache-clear --benchmark-disable "$@" .

# Test examples
for e in "$(pwd)"/examples/*.py; do
Expand Down
2 changes: 1 addition & 1 deletion ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ if hasArg "--run-python-tests"; then
conda list
cd ${CUGRAPH_ROOT}/python/cugraph-pyg/cugraph_pyg
# rmat is not tested because of MG testing
pytest --cache-clear --junitxml=${CUGRAPH_ROOT}/junit-cugraph-pytests.xml -v --cov-config=.coveragerc --cov=cugraph_pyg --cov-report=xml:${WORKSPACE}/python/cugraph_pyg/cugraph-coverage.xml --cov-report term --ignore=raft --ignore=tests/mg --ignore=tests/int --ignore=tests/generators --benchmark-disable
pytest -sv -m sg --cache-clear --junitxml=${CUGRAPH_ROOT}/junit-cugraph-pytests.xml -v --cov-config=.coveragerc --cov=cugraph_pyg --cov-report=xml:${WORKSPACE}/python/cugraph_pyg/cugraph-coverage.xml --cov-report term --ignore=raft --benchmark-disable
echo "Ran Python pytest for cugraph_pyg : return code was: $?, test script exit code is now: $EXITCODE"

echo "Python pytest for cugraph-service (single-GPU only)..."
Expand Down
7 changes: 4 additions & 3 deletions ci/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,14 @@ if [[ "${RAPIDS_CUDA_VERSION}" == "11.8.0" ]]; then

# Install pyg dependencies (which requires pip)

pip install ogb
pip install \
ogb \
tensordict

pip install \
pyg_lib \
torch_scatter \
torch_sparse \
torch_cluster \
torch_spline_conv \
-f ${PYG_URL}

rapids-print-env
Expand Down
5 changes: 2 additions & 3 deletions ci/test_wheel_cugraph-pyg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,14 @@ rapids-retry python -m pip install \
pyg_lib \
torch_scatter \
torch_sparse \
torch_cluster \
torch_spline_conv \
tensordict \
-f ${PYG_URL}

rapids-logger "pytest cugraph-pyg (single GPU)"
pushd python/cugraph-pyg/cugraph_pyg
python -m pytest \
--cache-clear \
--ignore=tests/mg \
--benchmark-disable \
tests
# Test examples
for e in "$(pwd)"/examples/*.py; do
Expand Down
1 change: 1 addition & 0 deletions conda/recipes/cugraph-pyg/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ requirements:
- cupy >=12.0.0
- cugraph ={{ version }}
- pylibcugraphops ={{ minor_version }}
- tensordict >=0.1.2
- pyg >=2.5,<2.6

tests:
Expand Down
1 change: 1 addition & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ dependencies:
- cugraph==24.6.*
- pytorch>=2.0
- pytorch-cuda==11.8
- tensordict>=0.1.2
- pyg>=2.5,<2.6

depends_on_rmm:
Expand Down
34 changes: 32 additions & 2 deletions docs/cugraph/source/api_docs/cugraph-pyg/cugraph_pyg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,38 @@ cugraph-pyg

.. currentmodule:: cugraph_pyg

Graph Storage
-------------
.. autosummary::
:toctree: ../api/cugraph-pyg/

.. cugraph_pyg.data.cugraph_store.EXPERIMENTAL__CuGraphStore
.. cugraph_pyg.sampler.cugraph_sampler.EXPERIMENTAL__CuGraphSampler
cugraph_pyg.data.dask_graph_store.DaskGraphStore
cugraph_pyg.data.graph_store.GraphStore

Feature Storage
---------------
.. autosummary::
:toctree: ../api/cugraph-pyg/

cugraph_pyg.data.feature_store.TensorDictFeatureStore
cugraph_pyg.data.feature_store.WholeFeatureStore

Data Loaders
------------
.. autosummary::
:toctree: ../api/cugraph-pyg/

cugraph_pyg.loader.dask_node_loader.DaskNeighborLoader
cugraph_pyg.loader.dask_node_loader.BulkSampleLoader
cugraph_pyg.loader.node_loader.NodeLoader
cugraph_pyg.loader.neighbor_loader.NeighborLoader

Samplers
--------
.. autosummary::
:toctree: ../api/cugraph-pyg/

cugraph_pyg.sampler.sampler.BaseSampler
cugraph_pyg.sampler.sampler.SampleReader
cugraph_pyg.sampler.sampler.HomogeneousSampleReader
cugraph_pyg.sampler.sampler.SampleIterator
1 change: 1 addition & 0 deletions python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ dependencies:
- pytorch-cuda==11.8
- pytorch>=2.0
- scipy
- tensordict>=0.1.2
name: cugraph_pyg_dev_cuda-118
16 changes: 14 additions & 2 deletions python/cugraph-pyg/cugraph_pyg/data/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2023, NVIDIA CORPORATION.
# Copyright (c) 2022-2024, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -11,4 +11,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from cugraph_pyg.data.cugraph_store import CuGraphStore
import warnings

from cugraph_pyg.data.dask_graph_store import DaskGraphStore
from cugraph_pyg.data.graph_store import GraphStore
from cugraph_pyg.data.feature_store import (
TensorDictFeatureStore,
WholeFeatureStore,
)


def CuGraphStore(*args, **kwargs):
warnings.warn("CuGraphStore has been renamed to DaskGraphStore", FutureWarning)
return DaskGraphStore(*args, **kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def cast(cls, *args, **kwargs):
return cls(*args, **kwargs)


class CuGraphStore:
class DaskGraphStore:
"""
Duck-typed version of PyG's GraphStore and FeatureStore.
"""
Expand All @@ -221,7 +221,7 @@ def __init__(
order: str = "CSR",
):
"""
Constructs a new CuGraphStore from the provided
Constructs a new DaskGraphStore from the provided
arguments.

Parameters
Expand Down
Loading
Loading