Skip to content

Commit

Permalink
Merge branch 'branch-23.10' of github.com:rapidsai/cugraph into fea_mfg
Browse files Browse the repository at this point in the history
  • Loading branch information
seunghwak committed Sep 12, 2023
2 parents b8b72be + 17b3447 commit 38dd11e
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ci/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ rapids-print-env

rapids-logger "Begin cpp build"

rapids-mamba-retry mambabuild conda/recipes/libcugraph
rapids-conda-retry mambabuild conda/recipes/libcugraph

rapids-upload-conda-to-s3 cpp
12 changes: 6 additions & 6 deletions ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ rapids-logger "Begin py build"

# TODO: Remove `--no-test` flags once importing on a CPU
# node works correctly
rapids-mamba-retry mambabuild \
rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
conda/recipes/pylibcugraph

rapids-mamba-retry mambabuild \
rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
Expand All @@ -30,7 +30,7 @@ rapids-mamba-retry mambabuild \
# platform to ensure it is included in each set of artifacts, since test
# scripts only install from one set of artifacts based on the CUDA version used
# for the test run.
rapids-mamba-retry mambabuild \
rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
Expand All @@ -40,7 +40,7 @@ rapids-mamba-retry mambabuild \
# built on each CUDA platform to ensure they are included in each set of
# artifacts, since test scripts only install from one set of artifacts based on
# the CUDA version used for the test run.
rapids-mamba-retry mambabuild \
rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
Expand All @@ -50,7 +50,7 @@ RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}"

if [[ ${RAPIDS_CUDA_MAJOR} == "11" ]]; then
# Only CUDA 11 is supported right now due to PyTorch requirement.
rapids-mamba-retry mambabuild \
rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
Expand All @@ -60,7 +60,7 @@ if [[ ${RAPIDS_CUDA_MAJOR} == "11" ]]; then
conda/recipes/cugraph-pyg

# Only CUDA 11 is supported right now due to PyTorch requirement.
rapids-mamba-retry mambabuild \
rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
Expand Down
36 changes: 36 additions & 0 deletions python/cugraph/cugraph/datasets/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,42 @@ def get_path(self):

return self._path.absolute()

def is_directed(self):
"""
Returns True if the graph is a directed graph.
"""
return self.metadata["is_directed"]

def is_multigraph(self):
"""
Returns True if the graph is a multigraph.
"""
return self.metadata["is_multigraph"]

def is_symmetric(self):
"""
Returns True if the graph is symmetric.
"""
return self.metadata["is_symmetric"]

def number_of_nodes(self):
"""
An alias of number_of_vertices()
"""
return self.number_of_vertices()

def number_of_vertices(self):
"""
Get the number of vertices in the graph.
"""
return self.metadata["number_of_nodes"]

def number_of_edges(self):
"""
Get the number of edges in the graph.
"""
return self.metadata["number_of_edges"]


def download_all(force=False):
"""
Expand Down
10 changes: 10 additions & 0 deletions python/cugraph/cugraph/tests/utils/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,16 @@ def test_is_multigraph(dataset):
assert G.is_multigraph() == dataset.metadata["is_multigraph"]


@pytest.mark.parametrize("dataset", ALL_DATASETS)
def test_object_getters(dataset):
assert dataset.is_directed() == dataset.metadata["is_directed"]
assert dataset.is_multigraph() == dataset.metadata["is_multigraph"]
assert dataset.is_symmetric() == dataset.metadata["is_symmetric"]
assert dataset.number_of_nodes() == dataset.metadata["number_of_nodes"]
assert dataset.number_of_vertices() == dataset.metadata["number_of_nodes"]
assert dataset.number_of_edges() == dataset.metadata["number_of_edges"]


#
# Test experimental for DeprecationWarnings
#
Expand Down

0 comments on commit 38dd11e

Please sign in to comment.