diff --git a/python/cugraph-pyg/cugraph_pyg/data/__init__.py b/python/cugraph-pyg/cugraph_pyg/data/__init__.py index 6d51fd5e..06896c1e 100644 --- a/python/cugraph-pyg/cugraph_pyg/data/__init__.py +++ b/python/cugraph-pyg/cugraph_pyg/data/__init__.py @@ -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 @@ -13,7 +13,9 @@ 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, @@ -21,6 +23,16 @@ ) +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) diff --git a/python/cugraph-pyg/cugraph_pyg/examples/graph_sage_mg.py b/python/cugraph-pyg/cugraph_pyg/examples/graph_sage_mg.py index 93d813b0..58c5e0ec 100644 --- a/python/cugraph-pyg/cugraph_pyg/examples/graph_sage_mg.py +++ b/python/cugraph-pyg/cugraph_pyg/examples/graph_sage_mg.py @@ -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( diff --git a/python/cugraph-pyg/cugraph_pyg/examples/graph_sage_sg.py b/python/cugraph-pyg/cugraph_pyg/examples/graph_sage_sg.py index 8a81e271..de2bddd7 100644 --- a/python/cugraph-pyg/cugraph_pyg/examples/graph_sage_sg.py +++ b/python/cugraph-pyg/cugraph_pyg/examples/graph_sage_sg.py @@ -15,6 +15,7 @@ import time import argparse import gc +import warnings import torch @@ -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: diff --git a/python/cugraph-pyg/cugraph_pyg/loader/__init__.py b/python/cugraph-pyg/cugraph_pyg/loader/__init__.py index c804b3d1..28051f74 100644 --- a/python/cugraph-pyg/cugraph_pyg/loader/__init__.py +++ b/python/cugraph-pyg/cugraph_pyg/loader/__init__.py @@ -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 @@ -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):