Skip to content

Commit

Permalink
Merge branch 'branch-25.02' into lowest_common_ancestors
Browse files Browse the repository at this point in the history
  • Loading branch information
eriknw authored Jan 30, 2025
2 parents 45b1583 + 8427a4d commit 7ee35fc
Show file tree
Hide file tree
Showing 17 changed files with 187 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/cuda11.8-pip/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"args": {
"CUDA": "11.8",
"PYTHON_PACKAGE_MANAGER": "pip",
"BASE": "rapidsai/devcontainers:25.02-cpp-cuda11.8-ucx1.17.0-openmpi-ubuntu22.04"
"BASE": "rapidsai/devcontainers:25.02-cpp-cuda11.8-ucx1.18.0-openmpi-ubuntu22.04"
}
},
"runArgs": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"context": "${localWorkspaceFolder}/.devcontainer",
"dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile",
"args": {
"CUDA": "12.5",
"CUDA": "12.8",
"PYTHON_PACKAGE_MANAGER": "conda",
"BASE": "rapidsai/devcontainers:25.02-cpp-mambaforge-ubuntu22.04"
}
},
"runArgs": [
"--rm",
"--name",
"${localEnv:USER:anon}-rapids-${localWorkspaceFolderBasename}-25.02-cuda12.5-conda"
"${localEnv:USER:anon}-rapids-${localWorkspaceFolderBasename}-25.02-cuda12.8-conda"
],
"hostRequirements": {"gpu": "optional"},
"features": {
Expand All @@ -20,7 +20,7 @@
"overrideFeatureInstallOrder": [
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils"
],
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}-cuda12.5-envs}"],
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}-cuda12.8-envs}"],
"postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"],
"workspaceFolder": "/home/coder",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/nx-cugraph,type=bind,consistency=consistent",
Expand All @@ -29,7 +29,7 @@
"source=${localWorkspaceFolder}/../.cache,target=/home/coder/.cache,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.config,target=/home/coder/.config,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.conda/pkgs,target=/home/coder/.conda/pkgs,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.conda/${localWorkspaceFolderBasename}-cuda12.5-envs,target=/home/coder/.conda/envs,type=bind,consistency=consistent"
"source=${localWorkspaceFolder}/../.conda/${localWorkspaceFolderBasename}-cuda12.8-envs,target=/home/coder/.conda/envs,type=bind,consistency=consistent"
],
"customizations": {
"vscode": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
"context": "${localWorkspaceFolder}/.devcontainer",
"dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile",
"args": {
"CUDA": "12.5",
"CUDA": "12.8",
"PYTHON_PACKAGE_MANAGER": "pip",
"BASE": "rapidsai/devcontainers:25.02-cpp-cuda12.5-ucx1.17.0-openmpi-ubuntu22.04"
"BASE": "rapidsai/devcontainers:25.02-cpp-cuda12.8-ucx1.18.0-openmpi-ubuntu22.04"
}
},
"runArgs": [
"--rm",
"--name",
"${localEnv:USER:anon}-rapids-${localWorkspaceFolderBasename}-25.02-cuda12.5-pip"
"${localEnv:USER:anon}-rapids-${localWorkspaceFolderBasename}-25.02-cuda12.8-pip"
],
"hostRequirements": {"gpu": "optional"},
"features": {
"ghcr.io/rapidsai/devcontainers/features/cuda:25.2": {
"version": "12.5",
"version": "12.8",
"installcuBLAS": true,
"installcuSOLVER": true,
"installcuRAND": true,
Expand All @@ -28,15 +28,15 @@
"ghcr.io/rapidsai/devcontainers/features/cuda",
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils"
],
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/share/${localWorkspaceFolderBasename}-cuda12.5-venvs}"],
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/share/${localWorkspaceFolderBasename}-cuda12.8-venvs}"],
"postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"],
"workspaceFolder": "/home/coder",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/nx-cugraph,type=bind,consistency=consistent",
"mounts": [
"source=${localWorkspaceFolder}/../.aws,target=/home/coder/.aws,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.cache,target=/home/coder/.cache,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.config,target=/home/coder/.config,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.local/share/${localWorkspaceFolderBasename}-cuda12.5-venvs,target=/home/coder/.local/share/venvs,type=bind,consistency=consistent"
"source=${localWorkspaceFolder}/../.local/share/${localWorkspaceFolderBasename}-cuda12.8-venvs,target=/home/coder/.local/share/venvs,type=bind,consistency=consistent"
],
"customizations": {
"vscode": {
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:
jobs:
conda-python-build:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.02
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@cuda-12.8.0
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -37,15 +37,15 @@ jobs:
upload-conda:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-25.02
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@cuda-12.8.0
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
wheel-build-nx-cugraph:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.02
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@cuda-12.8.0
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -57,7 +57,7 @@ jobs:
wheel-publish-nx-cugraph:
needs: wheel-build-nx-cugraph
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-25.02
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@cuda-12.8.0
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
- wheel-build-nx-cugraph
- wheel-tests-nx-cugraph
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-25.02
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@cuda-12.8.0
if: always()
with:
needs: ${{ toJSON(needs) }}
changed-files:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@branch-25.02
uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@cuda-12.8.0
with:
files_yaml: |
test_notebooks:
Expand All @@ -42,37 +42,37 @@ jobs:
- '!notebooks/**'
devcontainer:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@branch-25.02
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@cuda-12.8.0
with:
arch: '["amd64"]'
cuda: '["12.5"]'
cuda: '["12.8"]'
build_command: |
sccache -z;
build-all --verbose -j$(nproc --ignore=1);
sccache -s;
checks:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-25.02
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@cuda-12.8.0
with:
enable_check_generated_files: false
conda-python-build:
needs: [checks]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.02
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@cuda-12.8.0
with:
build_type: pull-request
conda-python-tests:
needs: [conda-python-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-25.02
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@cuda-12.8.0
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
run_codecov: false
wheel-build-nx-cugraph:
needs: [checks]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.02
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@cuda-12.8.0
with:
build_type: pull-request
script: ci/build_wheel_nx-cugraph.sh
Expand All @@ -81,7 +81,7 @@ jobs:
wheel-tests-nx-cugraph:
needs: [wheel-build-nx-cugraph, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-25.02
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@cuda-12.8.0
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
jobs:
conda-python-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-25.02
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@cuda-12.8.0
with:
build_type: nightly
branch: ${{ inputs.branch }}
Expand All @@ -27,7 +27,7 @@ jobs:
run_codecov: false
wheel-tests-nx-cugraph:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-25.02
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@cuda-12.8.0
with:
build_type: nightly
branch: ${{ inputs.branch }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ repos:
# Don't have strict linting for miscellaneous code
args: [--extend-exclude, "benchmarks/,ci/,docs/,notebooks/"]
- repo: https://github.com/rapidsai/dependency-file-generator
rev: v1.16.0
rev: v1.17.0
hooks:
- id: rapids-dependency-file-generator
args: ["--clean"]
Expand Down
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# nx-cugraph 24.12.00 (11 Dec 2024)

## 🚨 Breaking Changes

- Add `nx-cugraph` Package Publishing ([#16](https://github.com/rapidsai/nx-cugraph/pull/16)) [@nv-rliu](https://github.com/nv-rliu)
- Merge fast-forwarded files from cugraph into nx-cugraph ([#13](https://github.com/rapidsai/nx-cugraph/pull/13)) [@nv-rliu](https://github.com/nv-rliu)
- Update `.pre-commit-config.yaml` and Implement Suggestions ([#12](https://github.com/rapidsai/nx-cugraph/pull/12)) [@nv-rliu](https://github.com/nv-rliu)
- [CI] Adding CI Workflows: checks, changed-files, builds ([#6](https://github.com/rapidsai/nx-cugraph/pull/6)) [@nv-rliu](https://github.com/nv-rliu)
- Setting Up New Repo, Adding Files, etc. ([#5](https://github.com/rapidsai/nx-cugraph/pull/5)) [@nv-rliu](https://github.com/nv-rliu)

## 🐛 Bug Fixes

- Add sphinx-lint pre-commit (and some docs fixes) ([#29](https://github.com/rapidsai/nx-cugraph/pull/29)) [@eriknw](https://github.com/eriknw)
- Update and test `_nx_cugraph._check_networkx_version` ([#24](https://github.com/rapidsai/nx-cugraph/pull/24)) [@eriknw](https://github.com/eriknw)
- Remove automatic "Python" labeler ([#23](https://github.com/rapidsai/nx-cugraph/pull/23)) [@eriknw](https://github.com/eriknw)

## 📖 Documentation

- Remove `docs/` directory ([#37](https://github.com/rapidsai/nx-cugraph/pull/37)) [@eriknw](https://github.com/eriknw)

## 🛠️ Improvements

- Small Updates to Benchmarks Directory ([#48](https://github.com/rapidsai/nx-cugraph/pull/48)) [@nv-rliu](https://github.com/nv-rliu)
- Includes all deferred conversion costs in benchmarks ([#34](https://github.com/rapidsai/nx-cugraph/pull/34)) [@rlratzel](https://github.com/rlratzel)
- Add Bipartite Betweenness Centrality ([#32](https://github.com/rapidsai/nx-cugraph/pull/32)) [@nv-rliu](https://github.com/nv-rliu)
- Change `degree_type` of `core_number` to `"outgoing"` ([#28](https://github.com/rapidsai/nx-cugraph/pull/28)) [@eriknw](https://github.com/eriknw)
- Drop support for NetworkX 3.0 and 3.1 ([#27](https://github.com/rapidsai/nx-cugraph/pull/27)) [@eriknw](https://github.com/eriknw)
- remove versioning workaround for nightlies ([#26](https://github.com/rapidsai/nx-cugraph/pull/26)) [@jameslamb](https://github.com/jameslamb)
- add devcontainers ([#25](https://github.com/rapidsai/nx-cugraph/pull/25)) [@jameslamb](https://github.com/jameslamb)
- Add pre-commit hook to disallow improper comparison to `_nxver` ([#22](https://github.com/rapidsai/nx-cugraph/pull/22)) [@eriknw](https://github.com/eriknw)
- Add notebooks/demo/accelerating_networkx.ipynb ([#21](https://github.com/rapidsai/nx-cugraph/pull/21)) [@eriknw](https://github.com/eriknw)
- enforce wheel size limits, README formatting in CI ([#19](https://github.com/rapidsai/nx-cugraph/pull/19)) [@jameslamb](https://github.com/jameslamb)
- Faster `shortest_path` ([#18](https://github.com/rapidsai/nx-cugraph/pull/18)) [@eriknw](https://github.com/eriknw)
- nx-cugraph: dispatch graph method to gpu or cpu ([#17](https://github.com/rapidsai/nx-cugraph/pull/17)) [@eriknw](https://github.com/eriknw)
- Add `nx-cugraph` Package Publishing ([#16](https://github.com/rapidsai/nx-cugraph/pull/16)) [@nv-rliu](https://github.com/nv-rliu)
- add CI workflows running tests ([#15](https://github.com/rapidsai/nx-cugraph/pull/15)) [@jameslamb](https://github.com/jameslamb)
- remove more cugraph-only details, other miscellaneous build/packaging changes ([#14](https://github.com/rapidsai/nx-cugraph/pull/14)) [@jameslamb](https://github.com/jameslamb)
- Merge fast-forwarded files from cugraph into nx-cugraph ([#13](https://github.com/rapidsai/nx-cugraph/pull/13)) [@nv-rliu](https://github.com/nv-rliu)
- Update `.pre-commit-config.yaml` and Implement Suggestions ([#12](https://github.com/rapidsai/nx-cugraph/pull/12)) [@nv-rliu](https://github.com/nv-rliu)
- Adding a `dependencies.yaml` file ([#9](https://github.com/rapidsai/nx-cugraph/pull/9)) [@nv-rliu](https://github.com/nv-rliu)
- [CI] Adding CI Workflows: checks, changed-files, builds ([#6](https://github.com/rapidsai/nx-cugraph/pull/6)) [@nv-rliu](https://github.com/nv-rliu)
- Setting Up New Repo, Adding Files, etc. ([#5](https://github.com/rapidsai/nx-cugraph/pull/5)) [@nv-rliu](https://github.com/nv-rliu)
6 changes: 5 additions & 1 deletion _nx_cugraph/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023-2024, NVIDIA CORPORATION.
# Copyright (c) 2023-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 Down Expand Up @@ -115,6 +115,7 @@
"katz_centrality",
"krackhardt_kite_graph",
"ladder_graph",
"leiden_communities",
"les_miserables_graph",
"lollipop_graph",
"louvain_communities",
Expand Down Expand Up @@ -237,6 +238,9 @@
"katz_centrality": {
"dtype : dtype or None, optional": "The data type (np.float32, np.float64, or None) to use for the edge weights in the algorithm. If None, then dtype is determined by the edge values.",
},
"leiden_communities": {
"dtype : dtype or None, optional": "The data type (np.float32, np.float64, or None) to use for the edge weights in the algorithm. If None, then dtype is determined by the edge values.",
},
"louvain_communities": {
"dtype : dtype or None, optional": "The data type (np.float32, np.float64, or None) to use for the edge weights in the algorithm. If None, then dtype is determined by the edge values.",
},
Expand Down
25 changes: 24 additions & 1 deletion benchmarks/pytest-based/bench_algos.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023-2024, NVIDIA CORPORATION.
# Copyright (c) 2023-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 Down Expand Up @@ -39,6 +39,8 @@
pytest.param(
datasets.email_Eu_core, marks=[pytest.mark.small, pytest.mark.directed]
),
# name: amazon0302, nodes: 262111, edges: 1234877
pytest.param(datasets.amazon0302, marks=[pytest.mark.medium, pytest.mark.directed]),
# name: cit-Patents, nodes: 3774768, edges: 16518948
pytest.param(
datasets.cit_patents, marks=[pytest.mark.medium, pytest.mark.directed]
Expand Down Expand Up @@ -317,6 +319,27 @@ def bench_louvain_communities(benchmark, graph_obj, backend_wrapper):
assert type(result) is list


@pytest.mark.skipif("not hasattr(nx.community, 'leiden_communities')")
def bench_leiden_communities(benchmark, graph_obj, backend_wrapper):
G = get_graph_obj_for_benchmark(graph_obj, backend_wrapper)
# DiGraphs are not supported
if G.is_directed():
G = G.to_undirected()
if G.__networkx_backend__ not in nx.community.leiden_communities.backends:
pytest.skip(
reason=f"leiden_communities not implemented by {G.__networkx_backend__!r}"
)
return
result = benchmark.pedantic(
target=backend_wrapper(nx.community.leiden_communities),
args=(G,),
rounds=rounds,
iterations=iterations,
warmup_rounds=warmup_rounds,
)
assert type(result) is list


def bench_degree_centrality(benchmark, graph_obj, backend_wrapper):
G = get_graph_obj_for_benchmark(graph_obj, backend_wrapper)
result = benchmark.pedantic(
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/pytest-based/run-main-benchmarks.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2024, NVIDIA CORPORATION.
# Copyright (c) 2024-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 Down Expand Up @@ -58,8 +58,8 @@ fi

for algo in $algos; do
for dataset in $datasets; do
# this script can be used to download benchmarking datasets by name via cugraph.datasets
python get_graph_bench_dataset.py $dataset
# this script can be used to download benchmarking datasets by name via cugraph.datasets
python get_graph_bench_dataset.py $dataset
for backend in $backends; do
name="${backend}__${algo}__${dataset}"
echo "Running: $backend, $dataset, bench_$algo"
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ dependencies:
- recommonmark
- scipy
- setuptools>=61.0.0
- sphinx
- sphinx-copybutton
- sphinx-markdown-tables
- sphinx<6
- sphinxcontrib-websupport
- wheel
name: all_cuda-118_arch-x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ channels:
- conda-forge
- nvidia
dependencies:
- cuda-version=12.5
- cuda-version=12.8
- cudf==25.2.*,>=0.0.0a0
- cupy>=12.0.0
- graphviz
Expand All @@ -28,9 +28,9 @@ dependencies:
- recommonmark
- scipy
- setuptools>=61.0.0
- sphinx
- sphinx-copybutton
- sphinx-markdown-tables
- sphinx<6
- sphinxcontrib-websupport
- wheel
name: all_cuda-125_arch-x86_64
name: all_cuda-128_arch-x86_64
Loading

0 comments on commit 7ee35fc

Please sign in to comment.