From 049d83352d7ed5091e6b8571c650139051dae439 Mon Sep 17 00:00:00 2001 From: Naim Date: Sat, 13 Jan 2024 02:14:24 +0100 Subject: [PATCH] Clear output --- .../cugraph_benchmarks/synth_release.ipynb | 264 +++--------------- 1 file changed, 32 insertions(+), 232 deletions(-) diff --git a/notebooks/cugraph_benchmarks/synth_release.ipynb b/notebooks/cugraph_benchmarks/synth_release.ipynb index 395a65ce73c..a04fa90ee3a 100644 --- a/notebooks/cugraph_benchmarks/synth_release.ipynb +++ b/notebooks/cugraph_benchmarks/synth_release.ipynb @@ -116,7 +116,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -146,7 +146,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -189,7 +189,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -230,7 +230,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -273,7 +273,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -332,7 +332,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -362,7 +362,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -391,7 +391,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -426,7 +426,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -461,7 +461,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -496,7 +496,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -525,7 +525,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -555,7 +555,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -587,7 +587,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -621,7 +621,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -631,137 +631,9 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "------------------------------\n", - "Creating Graph of Scale = 9\n", - "Generated a dataframe of type , with 8192 edges\n", - "\tdata in gdf 8192 and data in pandas 8192\n", - "\tKatz n.c.\n", - "\tBC k=100 n.c." - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/mnaim/miniconda3/envs/cuda_12_new_2/lib/python3.10/site-packages/cugraph/centrality/katz_centrality.py:121: UserWarning: Katz centrality expects the 'store_transposed' flag to be set to 'True' for optimal performance during the graph creation\n", - " warnings.warn(warning_msg, UserWarning)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - " \n", - "\tLouvain n.c. \n", - "\tTC n.c. \n", - "\tCore Number n.c. \n", - "\tPageRank n.c. \n", - "\tJaccard n.c. \n", - "\tBFS n.c. \n", - "\tSSSP n.c. \n", - "------------------------------\n", - "Creating Graph of Scale = 10\n", - "Generated a dataframe of type , with 16384 edges\n", - "\tdata in gdf 16384 and data in pandas 16384\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/mnaim/miniconda3/envs/cuda_12_new_2/lib/python3.10/site-packages/cugraph/link_analysis/pagerank.py:227: UserWarning: Pagerank expects the 'store_transposed' flag to be set to 'True' for optimal performance during the graph creation\n", - " warnings.warn(warning_msg, UserWarning)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\tKatz n.c.\n", - "\tBC k=100 n." - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/mnaim/miniconda3/envs/cuda_12_new_2/lib/python3.10/site-packages/cugraph/centrality/katz_centrality.py:121: UserWarning: Katz centrality expects the 'store_transposed' flag to be set to 'True' for optimal performance during the graph creation\n", - " warnings.warn(warning_msg, UserWarning)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "c. \n", - "\tLouvain n.c. \n", - "\tTC n.c. \n", - "\tCore Number n.c. \n", - "\tPageRank n.c. \n", - "\tJaccard n.c. \n", - "\tBFS n.c. \n", - "\tSSSP n.c. \n", - "------------------------------\n", - "Creating Graph of Scale = 11\n", - "Generated a dataframe of type , with 32768 edges\n", - "\tdata in gdf 32768 and data in pandas 32768\n", - "\tKatz n." - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/mnaim/miniconda3/envs/cuda_12_new_2/lib/python3.10/site-packages/cugraph/link_analysis/pagerank.py:227: UserWarning: Pagerank expects the 'store_transposed' flag to be set to 'True' for optimal performance during the graph creation\n", - " warnings.warn(warning_msg, UserWarning)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "c.\n", - "\tBC k=100 n." - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/mnaim/miniconda3/envs/cuda_12_new_2/lib/python3.10/site-packages/cugraph/centrality/katz_centrality.py:121: UserWarning: Katz centrality expects the 'store_transposed' flag to be set to 'True' for optimal performance during the graph creation\n", - " warnings.warn(warning_msg, UserWarning)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "c. \n", - "\tLouvain n.c. \n", - "\tTC n.c. \n", - "\tCore Number n.c. \n", - "\tPageRank n.c. \n", - "\tJaccard n.c. \n", - "\tBFS n.c. \n", - "\tSSSP n.c. \n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/mnaim/miniconda3/envs/cuda_12_new_2/lib/python3.10/site-packages/cugraph/link_analysis/pagerank.py:227: UserWarning: Pagerank expects the 'store_transposed' flag to be set to 'True' for optimal performance during the graph creation\n", - " warnings.warn(warning_msg, UserWarning)\n" - ] - } - ], + "outputs": [], "source": [ "# arrays to capture performance gains\n", "names = []\n", @@ -971,26 +843,9 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[' ', 'Katz', 'BC Estimate fixed', 'Louvain', 'TC', 'Core Number', 'PageRank', 'Jaccard', 'BFS', 'SSP']\n", - "data_scale_9\n", - "[0.30174025119666154, 0.5252496066735675, 0.4815963183980694, 0.10059243531734213, 0.06274260384596582, 0.08087691640849742, 0.04259226789052634, 0.04541648848958121, 0.04630903277395244]\n", - "[10.57018736844198, 1.0236825289491465, 3.4565544669058315, 1.7519735735549575, 0.20360754388242536, 1.996866060869272, 0.017142060522749525, 0.07449551793212239, 0.10215939753145187]\n", - "data_scale_10\n", - "[10.422613622706065, 2.2596945327623845, 5.400742833397456, 2.670122216953594, 0.682892670528767, 2.511963848371226, 0.5618378459026585, 1.0027274366915082, 1.0377674050792682]\n", - "[27.48959075860895, 2.275587863157422, 6.2873877384903345, 3.4689708464108686, 0.3821397055328311, 3.8512864713871493, 0.0005884210429041734, 0.1674301749913076, 0.19472820374933392]\n", - "data_scale_11\n", - "[18.597918818212044, 4.662328129832614, 9.282539915015656, 5.826916762148887, 1.2560074010281037, 4.831561094416702, 0.6815771129976337, 1.956713995982869, 2.0017224534087275]\n", - "[50.381630992178266, 4.706337822317938, 10.371674476982982, 8.016961514792193, 0.7960839977603095, 7.554931432029648, 0.000286892032694886, 0.36503329352194, 0.3936930402823485]\n" - ] - } - ], + "outputs": [], "source": [ "#Print results\n", "print(algos)\n", @@ -1003,30 +858,9 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "------------------------------\n", - "\tAlgorithm Run times (NX then cuGraph)\n", - "\n", - "[' ', 'Katz', 'BC Estimate fixed', 'Louvain', 'TC', 'Core Number', 'PageRank', 'Jaccard', 'BFS', 'SSP']\n", - "data_scale_9\n", - "[0.03168975654989481, 0.11808181460946798, 0.0607406310737133, 0.007159244269132614, 0.003216283395886421, 0.004577603191137314, 0.00012310687452554703, 0.00039636343717575073, 0.0004781009629368782]\n", - "[0.0029980316758155823, 0.11535003408789635, 0.017572594806551933, 0.004086388275027275, 0.015796484425663948, 0.002292393706738949, 0.007181568071246147, 0.005320634692907333, 0.004679950885474682]\n", - "data_scale_10\n", - "[0.07129270676523447, 0.26657472364604473, 0.1288990117609501, 0.01734251156449318, 0.008041061460971832, 0.009121773764491081, 7.294118404388428e-06, 0.0009355107322335243, 0.0010360050946474075]\n", - "[0.0025934437289834023, 0.11714543215930462, 0.020501202903687954, 0.004999324679374695, 0.021042203530669212, 0.002368500456213951, 0.012396086938679218, 0.005587467923760414, 0.005320262163877487]\n", - "data_scale_11\n", - "[0.13116520550101995, 0.5985189070925117, 0.296876666136086, 0.04408951010555029, 0.022953813895583153, 0.018125338479876518, 6.923452019691467e-06, 0.0021516336128115654, 0.0022359658032655716]\n", - "[0.002603433094918728, 0.1271729590371251, 0.0286237932741642, 0.005499528720974922, 0.02883340697735548, 0.0023991400375962257, 0.024132604710757732, 0.005894348956644535, 0.005679464899003506]\n" - ] - } - ], + "outputs": [], "source": [ "#Print results\n", "print(\"\\n------------------------------\")\n", @@ -1048,48 +882,16 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/mnaim/miniconda3/envs/cuda_12_new_2/lib/python3.10/site-packages/distributed/node.py:182: UserWarning: Port 8787 is already in use.\n", - "Perhaps you already have a cluster running?\n", - "Hosting the HTTP server on port 37567 instead\n", - " warnings.warn(\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "Dask client/cluster created using LocalCUDACluster\n" - ] - }, - { - "ename": "Exception", - "evalue": "Communicator is already initialized", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mException\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[22], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Setting up cluter\u001b[39;00m\n\u001b[0;32m----> 2\u001b[0m setup_objs \u001b[38;5;241m=\u001b[39m \u001b[43mstart_dask_client\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 4\u001b[0m gdf \u001b[38;5;241m=\u001b[39m generate_data(\u001b[38;5;241m10\u001b[39m, mg\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m)\n\u001b[1;32m 5\u001b[0m \u001b[38;5;66;03m# create graph\u001b[39;00m\n", - "File \u001b[0;32m~/miniconda3/envs/cuda_12_new_2/lib/python3.10/site-packages/cugraph/testing/mg_utils.py:167\u001b[0m, in \u001b[0;36mstart_dask_client\u001b[0;34m(protocol, rmm_async, rmm_pool_size, dask_worker_devices, jit_unspill, worker_class, device_memory_limit)\u001b[0m\n\u001b[1;32m 164\u001b[0m \u001b[38;5;66;03m# FIXME: use proper logging, INFO or DEBUG level\u001b[39;00m\n\u001b[1;32m 165\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;124mDask client/cluster created using LocalCUDACluster\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m--> 167\u001b[0m \u001b[43mComms\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43minitialize\u001b[49m\u001b[43m(\u001b[49m\u001b[43mp2p\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m 169\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m (client, cluster)\n", - "File \u001b[0;32m~/miniconda3/envs/cuda_12_new_2/lib/python3.10/site-packages/cugraph/dask/comms/comms.py:158\u001b[0m, in \u001b[0;36minitialize\u001b[0;34m(comms, p2p, prows, pcols, partition_type)\u001b[0m\n\u001b[1;32m 156\u001b[0m __instance \u001b[38;5;241m=\u001b[39m comms\n\u001b[1;32m 157\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m--> 158\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mCommunicator is already initialized\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n", - "\u001b[0;31mException\u001b[0m: Communicator is already initialized" - ] - } - ], + "outputs": [], "source": [ "\n", "# Setting up cluter\n", "setup_objs = start_dask_client()\n", "\n", - "gdf = generate_data(10, mg=True)\n", "# create graph\n", + "gdf = generate_data(10, mg=True)\n", "g_cu, tcu = create_cu_graph(gdf, mg=True)\n", "del gdf\n", "\n", @@ -1101,16 +903,14 @@ "num_nodes = g_cu.number_of_vertices()\n", "k = 100 if num_nodes > 100 else num_nodes\n", "\n", - "tc = cu_katz(g_cu, alpha, mg=True)\n", - "tc = cu_bc(g_cu, k, mg=True)\n", - "tc = cu_louvain(g_cu, mg=True)\n", - "tc = cu_tc(g_cu, mg=True)\n", - "tc = cu_core_num(g_cu, mg=True)\n", - "tc = cu_pagerank(g_cu, mg=True)\n", - "tc = cu_jaccard(g_cu, mg=True)\n", - "tc = cu_bfs(g_cu, mg=True)\n", - "\n", - "\n", + "cu_katz(g_cu, alpha, mg=True)\n", + "cu_bc(g_cu, k, mg=True)\n", + "cu_louvain(g_cu, mg=True)\n", + "cu_tc(g_cu, mg=True)\n", + "cu_core_num(g_cu, mg=True)\n", + "cu_pagerank(g_cu, mg=True)\n", + "cu_jaccard(g_cu, mg=True)\n", + "cu_bfs(g_cu, mg=True)\n", "\n", "# Tearing down the cluster\n", "stop_dask_client(*setup_objs)"