Skip to content

Commit

Permalink
Respond to feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nv-rliu committed Oct 1, 2024
1 parent acccb4a commit 023b096
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
10 changes: 5 additions & 5 deletions notebooks/demo/accelerating_networkx.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"source": [
"# NetworkX - Easy Graph Analytics\n",
"\n",
"NetworkX is the most popular library for graph analytics available in python, or quite possibly any language. To illustrate this, NetworkX was downloaded more than 50 million times in April of 2024 alone, which is roughly 50 times more than the next most popular graph analytics library! [*](https://en.wikipedia.org/wiki/NetworkX) NetworkX has earned this popularity from its very easy-to-use API, the wealth of documentation and examples available, the large (and friendly) community behind it, and its easy installation which requires nothing more than python.\n",
"NetworkX is the most popular library for graph analytics available in Python, or quite possibly any language. To illustrate this, NetworkX was downloaded more than 50 million times in April of 2024 alone, which is roughly 50 times more than the next most popular graph analytics library! [*](https://en.wikipedia.org/wiki/NetworkX) NetworkX has earned this popularity from its very easy-to-use API, the wealth of documentation and examples available, the large (and friendly) community behind it, and its easy installation which requires nothing more than Python.\n",
"\n",
"However, NetworkX users are familiar with the tradeoff that comes with those benefits. The pure-python implementation often results in poor performance when graph data starts to reach larger scales, limiting the usefulness of the library for many real-world problems.\n",
"However, NetworkX users are familiar with the tradeoff that comes with those benefits. The pure-Python implementation often results in poor performance when graph data starts to reach larger scales, limiting the usefulness of the library for many real-world problems.\n",
"\n",
"# Accelerated NetworkX - Easy (and fast!) Graph Analytics\n",
"\n",
"To address the performance problem, NetworkX 3.0 introduced a mechanism to dispatch algorithm calls to alternate implementations. The NetworkX python API remains the same but NetworkX will use more capable algorithm implementations provided by one or more backends. This approach means users don't have to give up NetworkX -or even change their code- in order to take advantage of GPU performance."
"To address the performance problem, NetworkX 3.0 introduced a mechanism to dispatch algorithm calls to alternate implementations. The NetworkX Python API remains the same but NetworkX will use more capable algorithm implementations provided by one or more backends. This approach means users don't have to give up NetworkX -or even change their code- in order to take advantage of GPU performance."
]
},
{
Expand Down Expand Up @@ -192,7 +192,7 @@
"id": "z1hxut3GTj5A"
},
"source": [
"You may have noticed that using the `nx-cugraph` backend resulted in a slightly slower execution time. This is not suprising when working with a graph this small, since the overhead of converting the graph for the first time and launching the algorithm kernel on the GPU is actually significantly more than the computation time itself. We'll see later that this overhead is negligable when compared to the time saved when running on a GPU for larger graphs.\n",
"You may have noticed that using the `nx-cugraph` backend resulted in a slightly slower execution time. This is not surprising when working with a graph this small, since the overhead of converting the graph for the first time and launching the algorithm kernel on the GPU is actually significantly more than the computation time itself. We'll see later that this overhead is negligeble when compared to the time saved when running on a GPU for larger graphs.\n",
"\n",
"Since we've enabled graph conversion caching, we can see that if we re-run the same call the execution time is noticeably shorter."
]
Expand Down Expand Up @@ -374,7 +374,7 @@
"source": [
"Now we'll look at a larger dataset from https://snap.stanford.edu/data/cit-Patents.html which contains citations across different U.S. patents granted from January 1, 1963 to December 30, 1999. The dataset represents 16.5M citations (edges) between 3.77M patents (nodes).\n",
"\n",
"This will demonstrate that data of this size starts to push the limits of the default pure-python NetworkX implementation."
"This will demonstrate that data of this size starts to push the limits of the default pure-Python NetworkX implementation."
]
},
{
Expand Down
7 changes: 2 additions & 5 deletions notebooks/demo/nxcg_wikipedia_e2e.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,8 @@
"metadata": {},
"outputs": [],
"source": [
"# TODO: remove this\n",
"dataset_folder = \"~/nvrliu/notebooks/demo/data/wikipedia\"\n",
"\n",
"edgelist_csv = f\"{dataset_folder}/enwiki-20240620-edges.csv\"\n",
"nodedata_csv = f\"{dataset_folder}/enwiki-20240620-nodeids.csv\""
"edgelist_csv = \"enwiki-20240620-edges.csv\"\n",
"nodedata_csv = \"enwiki-20240620-nodeids.csv\""
]
},
{
Expand Down

0 comments on commit 023b096

Please sign in to comment.