Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge cugraph branch-24.12 Files #4

Merged
merged 39 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4d2dce9
DOC v24.10 Updates [skip ci]
raydouglass Jul 19, 2024
be9608e
Merge branch-24.08 into branch-24.10
jameslamb Jul 30, 2024
4788d35
Merge pull request #4565 from jameslamb/branch-24.10-merge-24.08
AyodeAwe Jul 30, 2024
845fab2
Merge pull request #4546 from rapidsai/branch-24.08
AyodeAwe Jul 30, 2024
4379e61
Merge pull request #4569 from rapidsai/branch-24.08
GPUtester Jul 30, 2024
13d1e77
Merge pull request #4574 from rapidsai/branch-24.08
GPUtester Jul 31, 2024
47c2fc7
Merge pull request #4580 from rapidsai/branch-24.08
GPUtester Jul 31, 2024
83b99b2
Update pre-commit hooks (#4605)
KyleFromNVIDIA Aug 9, 2024
4909256
Add Additional Check for `NetworkX` Release Candidate Versions (#4613)
nv-rliu Aug 16, 2024
65e5403
Drop Python 3.9 support (#4625)
jameslamb Aug 26, 2024
73bb63f
Update rapidsai/pre-commit-hooks (#4633)
KyleFromNVIDIA Aug 28, 2024
b8462fc
update a few more Python references to Python 3.10 (#4637)
jameslamb Aug 30, 2024
202b90c
Add `nx-cugraph` Benchmarking Scripts (#4616)
nv-rliu Aug 31, 2024
6e7f999
Add support for Python 3.12 (#4647)
jameslamb Sep 11, 2024
107c88a
Add `--cpu-only` or `--gpu-only` Arguments to `nx-cugraph` Benchmark …
nv-rliu Sep 11, 2024
2360446
Update flake8 to 7.1.1. (#4652)
bdice Sep 18, 2024
768b789
Recommending `miniforge` for conda install (#4650)
mmccarty Sep 19, 2024
59c6b33
DOC v24.12 Updates [skip ci]
raydouglass Sep 19, 2024
4f68f96
Drops duplicate edges in non-MultiGraph PLC `SGGraph` instances (#4658)
rlratzel Sep 20, 2024
757d0df
Merge pull request #4659 from rapidsai/branch-24.10
GPUtester Sep 20, 2024
32b2b83
nx-cugraph: Updates nxcg.Graph classes for API-compatibility with Net…
eriknw Sep 24, 2024
4a56ac0
Merge pull request #4667 from rapidsai/branch-24.10
GPUtester Sep 24, 2024
782958e
Fix `cit-patents` Dataset for `nx-cugraph` Benchmark (#4666)
nv-rliu Sep 25, 2024
7ed6877
Merge pull request #4673 from rapidsai/branch-24.10
GPUtester Sep 25, 2024
7122596
Remove NumPy <2 pin (#4615)
seberg Sep 30, 2024
08ddba4
Merge branch-24.10 into branch-24.12
jameslamb Sep 30, 2024
d2e656e
Merge pull request #4682 from jameslamb/branch-24.12-merge-24.10
raydouglass Sep 30, 2024
b9b218e
Swtch traceback to `--native` in `cugraph` (#4663)
galipremsagar Sep 30, 2024
d8c3ec6
Merge pull request #4684 from rapidsai/branch-24.10
GPUtester Sep 30, 2024
e68669a
Add `nx-cugraph` Docs Pages (#4669)
nv-rliu Oct 3, 2024
a908e22
Merge pull request #4688 from rapidsai/branch-24.10
GPUtester Oct 3, 2024
f3002ba
Add `nx-cugraph` introduction notebook to repo (#4677)
nv-rliu Oct 3, 2024
0f911fa
Merge pull request #4689 from rapidsai/branch-24.10
GPUtester Oct 3, 2024
6c1270e
Implementing some of the VDR feedback (#4674)
acostadon Oct 3, 2024
74306c3
Merge pull request #4691 from rapidsai/branch-24.10
GPUtester Oct 3, 2024
762b646
Merge cugraph branch-24.12
nv-rliu Oct 3, 2024
6d686a9
Merge branch 'rapidsai:main' into main
nv-rliu Oct 3, 2024
563fc3e
Remove unrelated docs
nv-rliu Oct 3, 2024
dde6f55
Merge branch 'main' of https://github.com/nv-rliu/nx-cugraph
nv-rliu Oct 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ repos:
hooks:
- id: black
language_version: python3
args: [--target-version=py39]
args: [--target-version=py310]
files: ^(python/.*|benchmarks/.*)$
exclude: ^python/nx-cugraph/
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 7.1.1
hooks:
- id: flake8
args: ["--config=.flake8"]
Expand All @@ -34,15 +34,15 @@ repos:
hooks:
- id: yesqa
additional_dependencies:
- flake8==6.0.0
- flake8==7.1.1
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6
hooks:
- id: clang-format
types_or: [c, c++, cuda]
args: ["-fallback-style=none", "-style=file", "-i"]
- repo: https://github.com/rapidsai/pre-commit-hooks
rev: v0.2.0
rev: v0.4.0
hooks:
- id: verify-copyright
files: |
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.08.00
24.12.00
54 changes: 54 additions & 0 deletions benchmarks/nx-cugraph/pytest-based/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
## `nx-cugraph` Benchmarks

### Overview

This directory contains a set of scripts designed to benchmark NetworkX with the `nx-cugraph` backend and deliver a report that summarizes the speed-up and runtime deltas over default NetworkX.

Our current benchmarks provide the following datasets:

| Dataset | Nodes | Edges | Directed |
| -------- | ------- | ------- | ------- |
| netscience | 1,461 | 5,484 | Yes |
| email-Eu-core | 1,005 | 25,571 | Yes |
| cit-Patents | 3,774,768 | 16,518,948 | Yes |
| hollywood | 1,139,905 | 57,515,616 | No |
| soc-LiveJournal1 | 4,847,571 | 68,993,773 | Yes |



### Scripts

#### 1. `run-main-benchmarks.sh`
This script allows users to run a small set of commonly-used algorithms across multiple datasets and backends. All results are stored inside a sub-directory (`logs/`) and output files are named based on the combination of parameters for that benchmark.

NOTE: If running with all algorithms and datasets using NetworkX without an accelerated backend, this script may take a few hours to finish running.

**Usage:**
- Run with `--cpu-only`:
```bash
./run-main-benchmarks.sh --cpu-only
```
- Run with `--gpu-only`:
```bash
./run-main-benchmarks.sh --gpu-only
```
- Run without any arguments (all backends):
```bash
./run-main-benchmarks.sh
```

#### 2. `get_graph_bench_dataset.py`
This script downloads the specified dataset using `cugraph.datasets`.

**Usage:**
```bash
python get_graph_bench_dataset.py [dataset]
```

#### 3. `create_results_summary_page.py`
This script is designed to be run after `run-gap-benchmarks.sh` in order to generate an HTML page displaying a results table comparing default NetworkX to nx-cugraph. The script also provides information about the current system, so it should be run on the machine on which benchmarks were run.

**Usage:**
```bash
python create_results_summary_page.py > report.html
```
31 changes: 29 additions & 2 deletions benchmarks/nx-cugraph/pytest-based/bench_algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,8 @@ def bench_from_networkx(benchmark, graph_obj):


# normalized_param_values = [True, False]
# k_param_values = [10, 100]
normalized_param_values = [True]
k_param_values = [10]
k_param_values = [10, 100, 1000]


@pytest.mark.parametrize(
Expand All @@ -282,6 +281,10 @@ def bench_from_networkx(benchmark, graph_obj):
@pytest.mark.parametrize("k", k_param_values, ids=lambda k: f"{k=}")
def bench_betweenness_centrality(benchmark, graph_obj, backend_wrapper, normalized, k):
G = get_graph_obj_for_benchmark(graph_obj, backend_wrapper)

if k > G.number_of_nodes():
pytest.skip(reason=f"{k=} > {G.number_of_nodes()=}")

result = benchmark.pedantic(
target=backend_wrapper(nx.betweenness_centrality),
args=(G,),
Expand All @@ -305,6 +308,10 @@ def bench_edge_betweenness_centrality(
benchmark, graph_obj, backend_wrapper, normalized, k
):
G = get_graph_obj_for_benchmark(graph_obj, backend_wrapper)

if k > G.number_of_nodes():
pytest.skip(reason=f"{k=} > {G.number_of_nodes()=}")

result = benchmark.pedantic(
target=backend_wrapper(nx.edge_betweenness_centrality),
args=(G,),
Expand Down Expand Up @@ -473,6 +480,26 @@ def bench_pagerank_personalized(benchmark, graph_obj, backend_wrapper):
assert type(result) is dict


def bench_shortest_path(benchmark, graph_obj, backend_wrapper):
"""
This passes in the source node with the highest degree, but no target.
"""
G = get_graph_obj_for_benchmark(graph_obj, backend_wrapper)
node = get_highest_degree_node(graph_obj)

result = benchmark.pedantic(
target=backend_wrapper(nx.shortest_path),
args=(G,),
kwargs=dict(
source=node,
),
rounds=rounds,
iterations=iterations,
warmup_rounds=warmup_rounds,
)
assert type(result) is dict


def bench_single_source_shortest_path_length(benchmark, graph_obj, backend_wrapper):
G = get_graph_obj_for_benchmark(graph_obj, backend_wrapper)
node = get_highest_degree_node(graph_obj)
Expand Down
Loading
Loading