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

Deprecate the Dask API in cuGraph-PyG #118

Merged
merged 22 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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-2024, NVIDIA CORPORATION.
# Copyright (c) 2022-2025, 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 @@ -13,14 +13,26 @@

import warnings

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


def DaskGraphStore(*args, **kwargs):
warnings.warn(
"DaskGraphStore and the Dask API are deprecated."
" Please switch over to the new API (cugraph_pyg.data.GraphStore)",
FutureWarning,
)

return DEPRECATED__DaskGraphStore(*args, **kwargs)


def CuGraphStore(*args, **kwargs):
warnings.warn("CuGraphStore has been renamed to DaskGraphStore", FutureWarning)
return DaskGraphStore(*args, **kwargs)
6 changes: 6 additions & 0 deletions python/cugraph-pyg/cugraph_pyg/examples/graph_sage_mg.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,12 @@ def parse_args():


def main():
warnings.warn(
"The Dask API is used in this example is deprecated. "
"Please refer to 'gcn_dist_mg' for an example that uses the new API.",
FutureWarning,
)

args = parse_args()
if args.dask_scheduler_file is None:
warnings.warn(
Expand Down
7 changes: 7 additions & 0 deletions python/cugraph-pyg/cugraph_pyg/examples/graph_sage_sg.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import time
import argparse
import gc
import warnings

import torch

Expand Down Expand Up @@ -201,6 +202,12 @@ def parse_args():


def main():
warnings.warn(
"The Dask API is used in this example is deprecated. "
"Please refer to 'gcn_dist_sg' for an example that uses the new API.",
FutureWarning,
)

args = parse_args()

try:
Expand Down
32 changes: 29 additions & 3 deletions python/cugraph-pyg/cugraph_pyg/loader/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2024, NVIDIA CORPORATION.
# Copyright (c) 2022-2025, 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 @@ -19,9 +19,35 @@
from cugraph_pyg.loader.link_loader import LinkLoader
from cugraph_pyg.loader.link_neighbor_loader import LinkNeighborLoader

from cugraph_pyg.loader.dask_node_loader import DaskNeighborLoader
from cugraph_pyg.loader.dask_node_loader import (
DaskNeighborLoader as DEPRECATED__DaskNeighborLoader,
)

from cugraph_pyg.loader.dask_node_loader import BulkSampleLoader
from cugraph_pyg.loader.dask_node_loader import (
BulkSampleLoader as DEPRECATED__BulkSampleLoader,
)


def DaskNeighborLoader(*args, **kwargs):
warnings.warn(
"DaskNeighborLoader and the Dask API are deprecated."
"Consider switching to the new API"
" (cugraph_pyg.loader.node_loader, cugraph_pyg.loader.link_loader).",
FutureWarning,
)

return DEPRECATED__DaskNeighborLoader(*args, **kwargs)


def BulkSampleLoader(*args, **kwargs):
warnings.warn(
"BulkSampleLoader and the Dask API are deprecated. Unbuffered sampling"
" in cugraph_pyg will soon be completely deprecated and removed, including"
" in the new API.",
FutureWarning,
)

return DEPRECATED__BulkSampleLoader(*args, **kwargs)


def CuGraphNeighborLoader(*args, **kwargs):
Expand Down