From 78b394c0cadbf9fc9b2c747d68b06f86a0a0cb29 Mon Sep 17 00:00:00 2001 From: Alex Barghi <105237337+alexbarghi-nv@users.noreply.github.com> Date: Fri, 17 Jun 2022 11:57:06 -0400 Subject: [PATCH] Fix experimental labels (#2331) Resolves #2315 Resolves #2303 Authors: - Alex Barghi (https://github.com/alexbarghi-nv) Approvers: - Joseph Nke (https://github.com/jnke2016) - Rick Ratzel (https://github.com/rlratzel) URL: https://github.com/rapidsai/cugraph/pull/2331 --- python/cugraph/cugraph/__init__.py | 4 ++-- python/cugraph/cugraph/dask/traversal/bfs.py | 10 +++++----- python/cugraph/cugraph/experimental/__init__.py | 13 ++++++++++++- .../cugraph/experimental/components/__init__.py | 0 .../{proto => experimental}/components/scc.py | 2 +- .../cugraph/experimental/structure/__init__.py | 0 .../structure/bicliques.py | 4 ++-- python/cugraph/cugraph/proto/__init__.py | 15 --------------- .../cugraph/cugraph/proto/components/__init__.py | 14 -------------- .../cugraph/cugraph/proto/structure/__init__.py | 14 -------------- python/cugraph/cugraph/traversal/bfs.py | 10 +++++----- 11 files changed, 27 insertions(+), 59 deletions(-) create mode 100644 python/cugraph/cugraph/experimental/components/__init__.py rename python/cugraph/cugraph/{proto => experimental}/components/scc.py (98%) create mode 100644 python/cugraph/cugraph/experimental/structure/__init__.py rename python/cugraph/cugraph/{proto => experimental}/structure/bicliques.py (98%) delete mode 100644 python/cugraph/cugraph/proto/__init__.py delete mode 100644 python/cugraph/cugraph/proto/components/__init__.py delete mode 100644 python/cugraph/cugraph/proto/structure/__init__.py diff --git a/python/cugraph/cugraph/__init__.py b/python/cugraph/cugraph/__init__.py index b7cee9e4c18..ff8694361f0 100644 --- a/python/cugraph/cugraph/__init__.py +++ b/python/cugraph/cugraph/__init__.py @@ -101,8 +101,8 @@ from cugraph.utilities import utils -from cugraph.proto.components import strong_connected_component -from cugraph.proto.structure import find_bicliques +from cugraph.experimental import strong_connected_component +from cugraph.experimental import find_bicliques from cugraph.linear_assignment import hungarian, dense_hungarian from cugraph.layout import force_atlas2 diff --git a/python/cugraph/cugraph/dask/traversal/bfs.py b/python/cugraph/cugraph/dask/traversal/bfs.py index 6a8f0933cfb..f03b511e316 100644 --- a/python/cugraph/cugraph/dask/traversal/bfs.py +++ b/python/cugraph/cugraph/dask/traversal/bfs.py @@ -13,11 +13,11 @@ # limitations under the License. # -from pylibcugraph.experimental import (MGGraph, - ResourceHandle, - GraphProperties, - ) -from pylibcugraph import bfs as pylibcugraph_bfs +from pylibcugraph import (MGGraph, + ResourceHandle, + GraphProperties, + bfs as pylibcugraph_bfs + ) from dask.distributed import wait, default_client from cugraph.dask.common.input_utils import get_distributed_data diff --git a/python/cugraph/cugraph/experimental/__init__.py b/python/cugraph/cugraph/experimental/__init__.py index 1c24389bafc..9f912346990 100644 --- a/python/cugraph/cugraph/experimental/__init__.py +++ b/python/cugraph/cugraph/experimental/__init__.py @@ -12,6 +12,7 @@ # limitations under the License. from cugraph.utilities.api_tools import experimental_warning_wrapper +from cugraph.utilities.api_tools import deprecated_warning_wrapper from cugraph.structure.property_graph import EXPERIMENTAL__PropertyGraph PropertyGraph = experimental_warning_wrapper(EXPERIMENTAL__PropertyGraph) @@ -27,4 +28,14 @@ from cugraph.experimental.community.triangle_count import \ EXPERIMENTAL__triangle_count -triangle_count = experimental_warning_wrapper(EXPERIMENTAL__triangle_count) \ No newline at end of file +triangle_count = experimental_warning_wrapper(EXPERIMENTAL__triangle_count) + +from cugraph.experimental.components.scc import \ + EXPERIMENTAL__strong_connected_component +strong_connected_component = \ + experimental_warning_wrapper(EXPERIMENTAL__strong_connected_component) + +from cugraph.experimental.structure.bicliques import EXPERIMENTAL__find_bicliques +find_bicliques = deprecated_warning_wrapper( + experimental_warning_wrapper(EXPERIMENTAL__find_bicliques) +) diff --git a/python/cugraph/cugraph/experimental/components/__init__.py b/python/cugraph/cugraph/experimental/components/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/cugraph/cugraph/proto/components/scc.py b/python/cugraph/cugraph/experimental/components/scc.py similarity index 98% rename from python/cugraph/cugraph/proto/components/scc.py rename to python/cugraph/cugraph/experimental/components/scc.py index d007815b504..de06cf33184 100644 --- a/python/cugraph/cugraph/proto/components/scc.py +++ b/python/cugraph/cugraph/experimental/components/scc.py @@ -27,7 +27,7 @@ # - repeat -def strong_connected_component(source, destination): +def EXPERIMENTAL__strong_connected_component(source, destination): """ Generate the strongly connected components using the FW-BW-TRIM approach, but skipping the trimming) diff --git a/python/cugraph/cugraph/experimental/structure/__init__.py b/python/cugraph/cugraph/experimental/structure/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/cugraph/cugraph/proto/structure/bicliques.py b/python/cugraph/cugraph/experimental/structure/bicliques.py similarity index 98% rename from python/cugraph/cugraph/proto/structure/bicliques.py rename to python/cugraph/cugraph/experimental/structure/bicliques.py index 760f06b8b93..4ebca853bb3 100644 --- a/python/cugraph/cugraph/proto/structure/bicliques.py +++ b/python/cugraph/cugraph/experimental/structure/bicliques.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2021, NVIDIA CORPORATION. +# Copyright (c) 2019-2022, 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 @@ -17,7 +17,7 @@ from collections import OrderedDict -def find_bicliques( +def EXPERIMENTAL__find_bicliques( df, k, offset=0, max_iter=-1, diff --git a/python/cugraph/cugraph/proto/__init__.py b/python/cugraph/cugraph/proto/__init__.py deleted file mode 100644 index 6ed5e96cff0..00000000000 --- a/python/cugraph/cugraph/proto/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2019-2022, 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from cugraph.proto.components import strong_connected_component -from cugraph.proto.structure import find_bicliques diff --git a/python/cugraph/cugraph/proto/components/__init__.py b/python/cugraph/cugraph/proto/components/__init__.py deleted file mode 100644 index 3ab6d50a76e..00000000000 --- a/python/cugraph/cugraph/proto/components/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2019-2021, 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from cugraph.proto.components.scc import strong_connected_component diff --git a/python/cugraph/cugraph/proto/structure/__init__.py b/python/cugraph/cugraph/proto/structure/__init__.py deleted file mode 100644 index 48036c84ec7..00000000000 --- a/python/cugraph/cugraph/proto/structure/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2019-2021, 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from cugraph.proto.structure.bicliques import find_bicliques diff --git a/python/cugraph/cugraph/traversal/bfs.py b/python/cugraph/cugraph/traversal/bfs.py index 547c76dded3..dea5f9327db 100644 --- a/python/cugraph/cugraph/traversal/bfs.py +++ b/python/cugraph/cugraph/traversal/bfs.py @@ -14,11 +14,11 @@ import cudf import dask_cudf -from pylibcugraph.experimental import (ResourceHandle, - GraphProperties, - SGGraph, - ) -from pylibcugraph import bfs as pylibcugraph_bfs +from pylibcugraph import (ResourceHandle, + GraphProperties, + SGGraph, + bfs as pylibcugraph_bfs + ) from cugraph.structure.graph_classes import Graph, DiGraph from cugraph.utilities import (ensure_cugraph_obj,