diff --git a/ci/test_notebooks.sh b/ci/test_notebooks.sh index c9dc99733a9..348428fdef1 100755 --- a/ci/test_notebooks.sh +++ b/ci/test_notebooks.sh @@ -34,7 +34,7 @@ pushd notebooks # Add notebooks that should be skipped here # (space-separated list of filenames without paths) -SKIPNBS="performance_comparisons.ipynb" +SKIPNBS="performance-comparisons.ipynb" EXITCODE=0 trap "EXITCODE=1" ERR diff --git a/docs/cudf/source/user_guide/index.md b/docs/cudf/source/user_guide/index.md index 0d74586e7a8..58b1b4eed81 100644 --- a/docs/cudf/source/user_guide/index.md +++ b/docs/cudf/source/user_guide/index.md @@ -12,7 +12,7 @@ groupby guide-to-udfs cupy-interop options -performance-comparisons +performance-comparisons/index PandasCompat copy-on-write ``` diff --git a/docs/cudf/source/user_guide/performance-comparisons/index.md b/docs/cudf/source/user_guide/performance-comparisons/index.md new file mode 100644 index 00000000000..9390fa64e9c --- /dev/null +++ b/docs/cudf/source/user_guide/performance-comparisons/index.md @@ -0,0 +1,8 @@ +# Performance comparisons + +```{toctree} +:maxdepth: 2 + + +performance-comparisons +``` diff --git a/docs/cudf/source/user_guide/performance_comparisons.ipynb b/docs/cudf/source/user_guide/performance-comparisons/performance-comparisons.ipynb similarity index 99% rename from docs/cudf/source/user_guide/performance_comparisons.ipynb rename to docs/cudf/source/user_guide/performance-comparisons/performance-comparisons.ipynb index 3dd671c37cc..d06c720494e 100644 --- a/docs/cudf/source/user_guide/performance_comparisons.ipynb +++ b/docs/cudf/source/user_guide/performance-comparisons/performance-comparisons.ipynb @@ -8,13 +8,16 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "This notebook compares the performance of `cuDF` and `pandas`. The comparisons performed are on identical data sizes. This notebook primarily showcases the factor\n", "of speedups users can have when the similar `pandas` APIs are run on GPUs using `cudf`.\n", "\n", - "The hardware details used to run these performance comparisons are at the end of this page." + "The hardware details used to run these performance comparisons are at the end of this page.\n", + "\n", + "**Note**: This notebook is written to measure performance on NVIDIA GPUs with large memory. If running on hardware with lower memory, please consider lowering the `num_rows` values. Performance results may vary by data size, as well as the CPU and GPU used." ] }, { @@ -576,9 +579,10 @@ }, "outputs": [], "source": [ + "num_rows = 300_000_000\n", "pd_series = pd.Series(\n", " np.random.choice(\n", - " [\"123\", \"56.234\", \"Walmart\", \"Costco\", \"rapids ai\"], size=300_000_000\n", + " [\"123\", \"56.234\", \"Walmart\", \"Costco\", \"rapids ai\"], size=num_rows\n", " )\n", ")" ] @@ -1368,10 +1372,10 @@ }, "outputs": [], "source": [ - "size = 100_000_000\n", + "num_rows = 100_000_000\n", "pdf = pd.DataFrame()\n", - "pdf[\"key\"] = np.random.randint(0, 2, size)\n", - "pdf[\"val\"] = np.random.randint(0, 7, size)\n", + "pdf[\"key\"] = np.random.randint(0, 2, num_rows)\n", + "pdf[\"val\"] = np.random.randint(0, 7, num_rows)\n", "\n", "\n", "def custom_formula_udf(df):\n", @@ -1634,7 +1638,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.9" + "version": "3.10.10" }, "vscode": { "interpreter": { diff --git a/notebooks/performance-comparisons b/notebooks/performance-comparisons new file mode 120000 index 00000000000..10be3bcf983 --- /dev/null +++ b/notebooks/performance-comparisons @@ -0,0 +1 @@ +../docs/cudf/source/user_guide/performance-comparisons/ \ No newline at end of file diff --git a/notebooks/performance_comparisons.ipynb b/notebooks/performance_comparisons.ipynb deleted file mode 120000 index 68c8aa19eee..00000000000 --- a/notebooks/performance_comparisons.ipynb +++ /dev/null @@ -1 +0,0 @@ -../docs/cudf/source/user_guide/performance_comparisons.ipynb \ No newline at end of file