diff --git a/docs/cugraph/source/nx_cugraph/benchmarks.md b/docs/cugraph/source/nx_cugraph/benchmarks.md
index 45085c133a9..9e0718159fa 100644
--- a/docs/cugraph/source/nx_cugraph/benchmarks.md
+++ b/docs/cugraph/source/nx_cugraph/benchmarks.md
@@ -9,7 +9,7 @@ We ran several commonly used graph algorithms on both `networkx` and `nx-cugraph
![bench-image](../_static/bc_benchmark.png)
Results from running this BenchmarkBenchmark
@@ -23,4 +23,4 @@ Below are the steps to reproduce the results on your own.
4. Install the latest `nx-cugraph` by following the [Installation Guide](installation.md)
-5. Follow the instructions written in the README [here](https://github.com/rapidsai/cugraph/blob/HEAD/benchmarks/nx-cugraph/pytest-based)
+5. Follow the instructions written in the README [here](https://github.com/rapidsai/nx-cugraph/blob/HEAD/benchmarks/nx-cugraph/pytest-based/README.md)
diff --git a/docs/cugraph/source/nx_cugraph/supported-algorithms.rst b/docs/cugraph/source/nx_cugraph/supported-algorithms.rst
index 8f57c02b240..ae32bc330fe 100644
--- a/docs/cugraph/source/nx_cugraph/supported-algorithms.rst
+++ b/docs/cugraph/source/nx_cugraph/supported-algorithms.rst
@@ -352,4 +352,4 @@ Generators
To request nx-cugraph backend support for a NetworkX API that is not listed
-above, visit the `cuGraph GitHub repo `_.
+above, visit the `nx-cugraph GitHub repo `_.
diff --git a/python/cugraph/cugraph/centrality/betweenness_centrality.py b/python/cugraph/cugraph/centrality/betweenness_centrality.py
index dd47b1e8df0..00a9972efba 100644
--- a/python/cugraph/cugraph/centrality/betweenness_centrality.py
+++ b/python/cugraph/cugraph/centrality/betweenness_centrality.py
@@ -58,6 +58,11 @@ def betweenness_centrality(
Algorithm (2001) to compute exact or approximate betweenness.
If weights are provided in the edgelist, they will not be used.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
k : int, list or cudf object or None, optional (default=None)
If k is not None, use k node samples to estimate betweenness. Higher
values give better approximation. If k is either a list, a cudf DataFrame,
@@ -224,6 +229,11 @@ def edge_betweenness_centrality(
The current implementation uses BFS traversals. Use weight parameter
if weights need to be considered (currently not supported).
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
k : int or list or None, optional (default=None)
If k is not None, use k node samples to estimate betweenness. Higher
values give better approximation. If k is either a list, a cudf DataFrame,
diff --git a/python/cugraph/cugraph/centrality/degree_centrality.py b/python/cugraph/cugraph/centrality/degree_centrality.py
index 12d39f4127e..3e5e8842cf5 100644
--- a/python/cugraph/cugraph/centrality/degree_centrality.py
+++ b/python/cugraph/cugraph/centrality/degree_centrality.py
@@ -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
@@ -28,6 +28,11 @@ def degree_centrality(G, normalized=True):
cuGraph graph descriptor with connectivity information. The graph can
contain either directed or undirected edges.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
normalized : bool, optional, default=True
If True normalize the resulting degree centrality values
diff --git a/python/cugraph/cugraph/centrality/eigenvector_centrality.py b/python/cugraph/cugraph/centrality/eigenvector_centrality.py
index 6be797096fc..d902a0dc947 100644
--- a/python/cugraph/cugraph/centrality/eigenvector_centrality.py
+++ b/python/cugraph/cugraph/centrality/eigenvector_centrality.py
@@ -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
@@ -37,6 +37,11 @@ def eigenvector_centrality(G, max_iter=100, tol=1.0e-6):
cuGraph graph descriptor with connectivity information. The graph can
contain either directed or undirected edges.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
max_iter : int, optional (default=100)
The maximum number of iterations before an answer is returned. This can
be used to limit the execution time and do an early exit before the
diff --git a/python/cugraph/cugraph/centrality/katz_centrality.py b/python/cugraph/cugraph/centrality/katz_centrality.py
index d902f9b06c9..1a44582d90e 100644
--- a/python/cugraph/cugraph/centrality/katz_centrality.py
+++ b/python/cugraph/cugraph/centrality/katz_centrality.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2019-2023, NVIDIA CORPORATION.
+# Copyright (c) 2019-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
@@ -48,6 +48,11 @@ def katz_centrality(
cuGraph graph descriptor with connectivity information. The graph can
contain either directed or undirected edges.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
alpha : float, optional (default=None)
Attenuation factor defaulted to None. If alpha is not specified then
it is internally calculated as 1/(degree_max) where degree_max is the
diff --git a/python/cugraph/cugraph/community/egonet.py b/python/cugraph/cugraph/community/egonet.py
index 56ae8ce70cc..e2a0833f6cb 100644
--- a/python/cugraph/cugraph/community/egonet.py
+++ b/python/cugraph/cugraph/community/egonet.py
@@ -62,6 +62,11 @@ def ego_graph(G, n, radius=1, center=True, undirected=None, distance=None):
information. Edge weights, if present, should be single or double
precision floating point values.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
n : integer or list, cudf.Series, cudf.DataFrame
A single node as integer or a cudf.DataFrame if nodes are
represented with multiple columns. If a cudf.DataFrame is provided,
diff --git a/python/cugraph/cugraph/community/induced_subgraph.py b/python/cugraph/cugraph/community/induced_subgraph.py
index c10241afa61..64d5ab09531 100644
--- a/python/cugraph/cugraph/community/induced_subgraph.py
+++ b/python/cugraph/cugraph/community/induced_subgraph.py
@@ -71,6 +71,11 @@ def induced_subgraph(
G : cugraph.Graph or networkx.Graph
The current implementation only supports weighted graphs.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
vertices : cudf.Series or cudf.DataFrame
Specifies the vertices of the induced subgraph. For multi-column
vertices, vertices should be provided as a cudf.DataFrame
diff --git a/python/cugraph/cugraph/community/ktruss_subgraph.py b/python/cugraph/cugraph/community/ktruss_subgraph.py
index bcf8527e17b..6535592856d 100644
--- a/python/cugraph/cugraph/community/ktruss_subgraph.py
+++ b/python/cugraph/cugraph/community/ktruss_subgraph.py
@@ -50,6 +50,11 @@ def k_truss(
defined for only undirected graphs as they are defined for
undirected triangle in a graph.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
k : int
The desired k to be used for extracting the k-truss subgraph.
diff --git a/python/cugraph/cugraph/community/leiden.py b/python/cugraph/cugraph/community/leiden.py
index d2a1a413d7b..6abedcac955 100644
--- a/python/cugraph/cugraph/community/leiden.py
+++ b/python/cugraph/cugraph/community/leiden.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2019-2023, NVIDIA CORPORATION.
+# Copyright (c) 2019-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
@@ -56,6 +56,11 @@ def leiden(
The adjacency list will be computed if not already present.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
max_iter : integer, optional (default=100)
This controls the maximum number of levels/iterations of the Leiden
algorithm. When specified the algorithm will terminate after no more
diff --git a/python/cugraph/cugraph/community/louvain.py b/python/cugraph/cugraph/community/louvain.py
index 0bedd427824..5c70a900b73 100644
--- a/python/cugraph/cugraph/community/louvain.py
+++ b/python/cugraph/cugraph/community/louvain.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2019-2023, NVIDIA CORPORATION.
+# Copyright (c) 2019-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
@@ -62,6 +62,11 @@ def louvain(
present.
The current implementation only supports undirected graphs.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
max_level : integer, optional (default=100)
This controls the maximum number of levels of the Louvain
algorithm. When specified the algorithm will terminate after no more
diff --git a/python/cugraph/cugraph/community/spectral_clustering.py b/python/cugraph/cugraph/community/spectral_clustering.py
index 8b4dbce830f..418e08e96d7 100644
--- a/python/cugraph/cugraph/community/spectral_clustering.py
+++ b/python/cugraph/cugraph/community/spectral_clustering.py
@@ -45,6 +45,11 @@ def spectralBalancedCutClustering(
G : cugraph.Graph or networkx.Graph
Graph descriptor
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
num_clusters : integer
Specifies the number of clusters to find, must be greater than 1
@@ -142,6 +147,11 @@ def spectralModularityMaximizationClustering(
G : cugraph.Graph or networkx.Graph
cuGraph graph descriptor. This graph should have edge weights.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
num_clusters : integer
Specifies the number of clusters to find
@@ -233,6 +243,11 @@ def analyzeClustering_modularity(
G : cugraph.Graph or networkx.Graph
graph descriptor. This graph should have edge weights.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
n_clusters : integer
Specifies the number of clusters in the given clustering
diff --git a/python/cugraph/cugraph/community/subgraph_extraction.py b/python/cugraph/cugraph/community/subgraph_extraction.py
index 43169051be4..e49e681c096 100644
--- a/python/cugraph/cugraph/community/subgraph_extraction.py
+++ b/python/cugraph/cugraph/community/subgraph_extraction.py
@@ -46,6 +46,11 @@ def subgraph(
G : cugraph.Graph or networkx.Graph
The current implementation only supports weighted graphs.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
vertices : cudf.Series or cudf.DataFrame
Specifies the vertices of the induced subgraph. For multi-column
vertices, vertices should be provided as a cudf.DataFrame
diff --git a/python/cugraph/cugraph/community/triangle_count.py b/python/cugraph/cugraph/community/triangle_count.py
index 247327b6e4c..eb2ee1465bc 100644
--- a/python/cugraph/cugraph/community/triangle_count.py
+++ b/python/cugraph/cugraph/community/triangle_count.py
@@ -54,6 +54,11 @@ def triangle_count(G, start_list=None):
(edge weights are not used in this algorithm).
The current implementation only supports undirected graphs.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
start_list : list or cudf.Series
list of vertices for triangle count. if None the entire set of vertices
in the graph is processed
diff --git a/python/cugraph/cugraph/components/connectivity.py b/python/cugraph/cugraph/components/connectivity.py
index 45dba37d2ce..00bf443278f 100644
--- a/python/cugraph/cugraph/components/connectivity.py
+++ b/python/cugraph/cugraph/components/connectivity.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2019-2023, NVIDIA CORPORATION.
+# Copyright (c) 2019-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
@@ -115,6 +115,11 @@ def weakly_connected_components(G, directed=None, connection=None, return_labels
The adjacency list will be computed if not already present. The number
of vertices should fit into a 32b int.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
directed : bool, optional (default=None)
NOTE
@@ -224,6 +229,11 @@ def strongly_connected_components(
The adjacency list will be computed if not already present. The number
of vertices should fit into a 32b int.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
directed : bool, optional (default=True)
NOTE
@@ -330,6 +340,11 @@ def connected_components(G, directed=None, connection="weak", return_labels=None
The adjacency list will be computed if not already present. The number
of vertices should fit into a 32b int.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
directed : bool, optional (default=True)
NOTE
diff --git a/python/cugraph/cugraph/cores/core_number.py b/python/cugraph/cugraph/cores/core_number.py
index 3e6cbe0d96f..0b411c2eed2 100644
--- a/python/cugraph/cugraph/cores/core_number.py
+++ b/python/cugraph/cugraph/cores/core_number.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2019-2023, NVIDIA CORPORATION.
+# Copyright (c) 2019-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
@@ -37,6 +37,11 @@ def core_number(G, degree_type="bidirectional"):
of the core numbers.
The current implementation only supports undirected graphs.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
degree_type: str, (default="bidirectional")
This option determines if the core number computation should be based
on input, output, or both directed edges, with valid values being
diff --git a/python/cugraph/cugraph/cores/k_core.py b/python/cugraph/cugraph/cores/k_core.py
index 3dbc1cfa377..6c8e20b0ea8 100644
--- a/python/cugraph/cugraph/cores/k_core.py
+++ b/python/cugraph/cugraph/cores/k_core.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2019-2023, NVIDIA CORPORATION.
+# Copyright (c) 2019-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
@@ -55,6 +55,11 @@ def k_core(G, k=None, core_number=None, degree_type="bidirectional"):
weights, they don't participate in the calculation of the k-core.
The current implementation only supports undirected graphs.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
k : int, optional (default=None)
Order of the core. This value must not be negative. If set to None, the
main core is returned.
diff --git a/python/cugraph/cugraph/link_analysis/pagerank.py b/python/cugraph/cugraph/link_analysis/pagerank.py
index ef0705c6be9..40ae14e76dd 100644
--- a/python/cugraph/cugraph/link_analysis/pagerank.py
+++ b/python/cugraph/cugraph/link_analysis/pagerank.py
@@ -107,6 +107,11 @@ def pagerank(
as an edge list.
The transposed adjacency list will be computed if not already present.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
alpha : float, optional (default=0.85)
The damping factor alpha represents the probability to follow an
outgoing edge, standard value is 0.85.
diff --git a/python/cugraph/cugraph/link_prediction/cosine.py b/python/cugraph/cugraph/link_prediction/cosine.py
index 9dce0e96f8c..71ef88b78b4 100644
--- a/python/cugraph/cugraph/link_prediction/cosine.py
+++ b/python/cugraph/cugraph/link_prediction/cosine.py
@@ -190,6 +190,11 @@ def cosine_coefficient(
This implementation only supports undirected, non-multi Graphs.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
ebunch : cudf.DataFrame or iterable of node pairs, optional (default=None)
A GPU dataframe consisting of two columns representing pairs of
vertices or iterable of 2-tuples (u, v) where u and v are nodes in
diff --git a/python/cugraph/cugraph/link_prediction/jaccard.py b/python/cugraph/cugraph/link_prediction/jaccard.py
index 214d92a1be5..77eb6447e85 100644
--- a/python/cugraph/cugraph/link_prediction/jaccard.py
+++ b/python/cugraph/cugraph/link_prediction/jaccard.py
@@ -190,6 +190,11 @@ def jaccard_coefficient(
This implementation only supports undirected, non-multi Graphs.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
ebunch : cudf.DataFrame or iterable of node pairs, optional (default=None)
A GPU dataframe consisting of two columns representing pairs of
vertices or iterable of 2-tuples (u, v) where u and v are nodes in
diff --git a/python/cugraph/cugraph/link_prediction/overlap.py b/python/cugraph/cugraph/link_prediction/overlap.py
index 52697d6b552..47c7765fb0f 100644
--- a/python/cugraph/cugraph/link_prediction/overlap.py
+++ b/python/cugraph/cugraph/link_prediction/overlap.py
@@ -75,6 +75,11 @@ def overlap_coefficient(
This implementation only supports undirected, non-multi edge Graph.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
ebunch : cudf.DataFrame or iterable of node pairs, optional (default=None)
A GPU dataframe consisting of two columns representing pairs of
vertices or iterable of 2-tuples (u, v) where u and v are nodes in
diff --git a/python/cugraph/cugraph/link_prediction/sorensen.py b/python/cugraph/cugraph/link_prediction/sorensen.py
index 8030234993b..d8327bf25a9 100644
--- a/python/cugraph/cugraph/link_prediction/sorensen.py
+++ b/python/cugraph/cugraph/link_prediction/sorensen.py
@@ -205,6 +205,11 @@ def sorensen_coefficient(
This implementation only supports undirected, non-multi Graphs.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
ebunch : cudf.DataFrame or iterable of node pairs, optional (default=None)
A GPU dataframe consisting of two columns representing pairs of
vertices or iterable of 2-tuples (u, v) where u and v are nodes in
diff --git a/python/cugraph/cugraph/sampling/node2vec.py b/python/cugraph/cugraph/sampling/node2vec.py
index 71fc2969f86..eb91bfec82b 100644
--- a/python/cugraph/cugraph/sampling/node2vec.py
+++ b/python/cugraph/cugraph/sampling/node2vec.py
@@ -60,6 +60,11 @@ def node2vec(G, start_vertices, max_depth=1, compress_result=True, p=1.0, q=1.0)
The graph can be either directed or undirected.
Weights in the graph are ignored.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
start_vertices: int or list or cudf.Series or cudf.DataFrame
A single node or a list or a cudf.Series of nodes from which to run
the random walks. In case of multi-column vertices it should be
diff --git a/python/cugraph/cugraph/sampling/random_walks.py b/python/cugraph/cugraph/sampling/random_walks.py
index 1bd7394164f..1c56dbbe324 100644
--- a/python/cugraph/cugraph/sampling/random_walks.py
+++ b/python/cugraph/cugraph/sampling/random_walks.py
@@ -72,6 +72,11 @@ def random_walks(
G : cuGraph.Graph or networkx.Graph
The graph can be either directed or undirected.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
random_walks_type : str, optional (default='uniform')
Type of random walks: 'uniform', 'biased', 'node2vec'.
Only 'uniform' random walks is currently supported
diff --git a/python/cugraph/cugraph/traversal/bfs.py b/python/cugraph/cugraph/traversal/bfs.py
index cad96947f8b..2335b1d390c 100644
--- a/python/cugraph/cugraph/traversal/bfs.py
+++ b/python/cugraph/cugraph/traversal/bfs.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2019-2023, NVIDIA CORPORATION.
+# Copyright (c) 2019-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
@@ -135,6 +135,11 @@ def bfs(
information. Edge weights, if present, should be single or double
precision floating point values.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
start : Integer or list, optional (default=None)
The id of the graph vertex from which the traversal begins, or
if a list, the vertex from which the traversal begins in each
@@ -265,6 +270,11 @@ def bfs_edges(G, source, reverse=False, depth_limit=None, sort_neighbors=None):
information. Edge weights, if present, should be single or double
precision floating point values.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
source : Integer
The starting vertex index
diff --git a/python/cugraph/cugraph/traversal/sssp.py b/python/cugraph/cugraph/traversal/sssp.py
index bb98b5a9a29..ad3f3c716d1 100644
--- a/python/cugraph/cugraph/traversal/sssp.py
+++ b/python/cugraph/cugraph/traversal/sssp.py
@@ -158,6 +158,12 @@ def sssp(
weights, if present, should be single or double precision floating
point values.
The current implementation only supports weighted graphs.
+
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
source : int
Index of the source vertex.
cutoff : double, optional (default=None)
@@ -323,6 +329,11 @@ def shortest_path_length(G, source, target=None):
cuGraph graph descriptor with connectivity information. Edge weights,
if present, should be single or double precision floating point values.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
source : Dependant on graph type. Index of the source vertex.
If graph is an instance of cuGraph.Graph or CuPy sparse COO matrix:
diff --git a/python/cugraph/cugraph/tree/minimum_spanning_tree.py b/python/cugraph/cugraph/tree/minimum_spanning_tree.py
index b297042f199..342ee0b77fe 100644
--- a/python/cugraph/cugraph/tree/minimum_spanning_tree.py
+++ b/python/cugraph/cugraph/tree/minimum_spanning_tree.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2019-2023, NVIDIA CORPORATION.
+# Copyright (c) 2019-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
@@ -72,6 +72,11 @@ def minimum_spanning_tree(G, weight=None, algorithm="boruvka", ignore_nan=False)
G : cuGraph.Graph or networkx.Graph
cuGraph graph descriptor with connectivity information.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
weight : string
default to the weights in the graph, if the graph edges do not have a
weight attribute a default weight of 1 will be used.
@@ -115,6 +120,11 @@ def maximum_spanning_tree(G, weight=None, algorithm="boruvka", ignore_nan=False)
G : cuGraph.Graph or networkx.Graph
cuGraph graph descriptor with connectivity information.
+ .. deprecated:: 24.12
+ Accepting a ``networkx.Graph`` is deprecated and will be removed in a
+ future version. For ``networkx.Graph`` use networkx directly with
+ the ``nx-cugraph`` backend. See: https://rapids.ai/nx-cugraph/
+
weight : string
default to the weights in the graph, if the graph edges do not have a
weight attribute a default weight of 1 will be used.
diff --git a/python/cugraph/cugraph/utilities/utils.py b/python/cugraph/cugraph/utilities/utils.py
index 69616f26857..5bad68a79e2 100644
--- a/python/cugraph/cugraph/utilities/utils.py
+++ b/python/cugraph/cugraph/utilities/utils.py
@@ -23,6 +23,7 @@
from cuda.cudart import cudaDeviceAttr
from rmm._cuda.gpu import getDeviceAttribute
+from warnings import warn
# optional dependencies
try:
@@ -334,6 +335,12 @@ def ensure_cugraph_obj_for_nx(
input_type = type(obj)
if is_nx_graph_type(input_type):
+ warn(
+ "Support for accepting and returning NetworkX objects is "
+ "deprecated. Please use NetworkX with the nx-cugraph backend",
+ DeprecationWarning,
+ 2,
+ )
return (
convert_from_nx(
obj,
diff --git a/python/cugraph/pytest.ini b/python/cugraph/pytest.ini
index 5cbc4631664..bf6e6bdd802 100644
--- a/python/cugraph/pytest.ini
+++ b/python/cugraph/pytest.ini
@@ -71,3 +71,4 @@ filterwarnings =
# Called via dask. Not obviously addressable in cugraph.
ignore:The behavior of array concatenation with empty entries is deprecated:FutureWarning
ignore:This method is deprecated and will no longer be supported. The symmetrization:FutureWarning
+ ignore:Support for accepting and returning NetworkX objects is deprecated. Please use NetworkX with the nx-cugraph backend:DeprecationWarning