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

Heterogeneous Link Prediction Example for cuGraph-PyG #104

Merged
merged 28 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
35af4b4
heterogeneous sampling
alexbarghi-nv Nov 18, 2024
8da5c95
c
alexbarghi-nv Nov 22, 2024
4587bd9
reformat
alexbarghi-nv Dec 2, 2024
0786495
fix various bugs
alexbarghi-nv Dec 5, 2024
9eb3319
add num sampled nodes
alexbarghi-nv Dec 5, 2024
ef57559
get hetero input ids working
alexbarghi-nv Dec 5, 2024
c7f0000
fix src/dst confusion
alexbarghi-nv Dec 23, 2024
17eed83
pull in changes
alexbarghi-nv Jan 6, 2025
c9cead0
Merge branch 'branch-25.02' into hetero-examples-pyg
alexbarghi-nv Jan 6, 2025
6d84c7f
resolve merge conflicts
alexbarghi-nv Jan 27, 2025
22cb184
remove print statement
alexbarghi-nv Jan 27, 2025
b8b2c94
fix gc import
alexbarghi-nv Jan 27, 2025
b508514
fix link loader
alexbarghi-nv Jan 28, 2025
d216137
bug fix
alexbarghi-nv Jan 28, 2025
f37115b
support edge labeling
alexbarghi-nv Jan 28, 2025
295f5fa
fix label
alexbarghi-nv Jan 28, 2025
e15e6ca
select correct subset of label
alexbarghi-nv Jan 28, 2025
1bb3796
c
alexbarghi-nv Jan 28, 2025
296ed80
cleanup
alexbarghi-nv Jan 28, 2025
876207e
Merge branch 'branch-25.02' into hetero-examples-pyg
alexbarghi-nv Jan 29, 2025
725a460
update negative sampling behavior to match rapidsai/cugraph#4885
alexbarghi-nv Jan 30, 2025
b5fc731
Merge branch 'hetero-examples-pyg' of https://github.com/alexbarghi-n…
alexbarghi-nv Jan 30, 2025
5246f08
fix tests
alexbarghi-nv Jan 30, 2025
0bf9ebf
Merge branch 'branch-25.02' into hetero-examples-pyg
alexbarghi-nv Jan 31, 2025
a060b40
add temporary constraint for ogb
alexbarghi-nv Jan 31, 2025
cc4d740
Merge branch 'hetero-examples-pyg' of https://github.com/alexbarghi-n…
alexbarghi-nv Jan 31, 2025
dddf875
remove extra ogb dependency, add comment
alexbarghi-nv Jan 31, 2025
8da94c6
Fix pip bound
alexbarghi-nv Jan 31, 2025
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
1 change: 1 addition & 0 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ dependencies:
- pytest-forked
- pytest-xdist
- pytorch>=2.3
- pytorch>=2.3,<2.6a0
- pytorch_geometric>=2.5,<2.7
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- rmm==25.2.*,>=0.0.0a0
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-121_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ dependencies:
- pytest-forked
- pytest-xdist
- pytorch>=2.3
- pytorch>=2.3,<2.6a0
- pytorch_geometric>=2.5,<2.7
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- rmm==25.2.*,>=0.0.0a0
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-124_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ dependencies:
- pytest-forked
- pytest-xdist
- pytorch>=2.3
- pytorch>=2.3,<2.6a0
- pytorch_geometric>=2.5,<2.7
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- rmm==25.2.*,>=0.0.0a0
Expand Down
35 changes: 35 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ files:
- depends_on_dask_cudf
- depends_on_cupy
- depends_on_pytorch
- depends_on_ogb
- depends_on_dgl
- depends_on_pyg
- python_run_cugraph_dgl
Expand Down Expand Up @@ -52,6 +53,7 @@ files:
includes:
- cuda_version
- depends_on_pytorch
- depends_on_ogb
- depends_on_cugraph_dgl
- py_version
- test_notebook
Expand All @@ -63,6 +65,7 @@ files:
- depends_on_cudf
- depends_on_dgl
- depends_on_pytorch
- depends_on_ogb
- py_version
- test_python_common

Expand Down Expand Up @@ -123,6 +126,7 @@ files:
includes:
- depends_on_pylibwholegraph
- depends_on_pytorch
- depends_on_ogb
- test_python_common
py_build_cugraph_pyg:
output: pyproject
Expand Down Expand Up @@ -150,6 +154,7 @@ files:
- depends_on_pyg
- depends_on_pylibwholegraph
- depends_on_pytorch
- depends_on_ogb
- test_python_common
- test_python_cugraph_pyg

Expand All @@ -163,6 +168,7 @@ files:
- depends_on_cugraph
- depends_on_dgl
- depends_on_pytorch
- depends_on_ogb
- cugraph_dgl_dev
- test_python_common
cugraph_pyg_dev:
Expand All @@ -175,6 +181,7 @@ files:
- depends_on_cugraph
- depends_on_pyg
- depends_on_pytorch
- depends_on_ogb
- cugraph_pyg_dev
- test_python_common
channels:
Expand Down Expand Up @@ -428,6 +435,34 @@ dependencies:
- *tensordict
- {matrix: null, packages: [*pytorch_pip, *tensordict]}

# Will remove this after snap-stanford/ogb#497 is resolved.
# Temporarily sets the max pytorch version to 2.5 for compatibility
# with ogb.
depends_on_ogb:
common:
- output_types: [conda]
packages:
- pytorch>=2.3,<2.6a0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused, do we also need an upper bound pinning for pip packages? It appears to be reusing *pytorch_pip below, which won't have the <2.6a0 upper bound.

specific:
- output_types: [requirements]
matrices:
- matrix: {cuda: "12.*"}
packages:
- --extra-index-url=https://download.pytorch.org/whl/cu121
- matrix: {cuda: "11.*"}
packages:
- --extra-index-url=https://download.pytorch.org/whl/cu118
- {matrix: null, packages: null}
- output_types: [requirements, pyproject]
matrices:
- matrix: {cuda: "12.*"}
packages:
- torch>=2.3,<2.6a0
- matrix: {cuda: "11.*"}
packages:
- torch>=2.3,<2.6a0
- {matrix: null, packages: [*pytorch_pip]}

depends_on_dgl:
specific:
- output_types: [conda]
Expand Down
1 change: 1 addition & 0 deletions python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencies:
- pytest-cov
- pytest-xdist
- pytorch>=2.3
- pytorch>=2.3,<2.6a0
- tensordict>=0.1.2
- torchdata
name: cugraph_dgl_dev_cuda-118
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 @@ -15,6 +15,7 @@ dependencies:
- pytest-cov
- pytest-xdist
- pytorch>=2.3
- pytorch>=2.3,<2.6a0
- pytorch_geometric>=2.5,<2.7
- tensordict>=0.1.2
- torchdata
Expand Down
4 changes: 3 additions & 1 deletion python/cugraph-pyg/cugraph_pyg/data/graph_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,9 @@ def __get_weight_tensor(
return torch.concat(weights)

@property
def _numeric_edge_types(self) -> Tuple[List, "torch.Tensor", "torch.Tensor"]:
def _numeric_edge_types(
self,
) -> Tuple[List[Tuple[str, str, str]], "torch.Tensor", "torch.Tensor"]:
"""
Returns the canonical edge types in order (the 0th canonical type corresponds
to numeric edge type 0, etc.), along with the numeric source and destination
Expand Down
Loading