diff --git a/examples/scaling_relations_pdfparsing-big-font.pdf b/examples/scaling_relations_pdfparsing-big-font.pdf new file mode 100644 index 0000000..05e0ecb Binary files /dev/null and b/examples/scaling_relations_pdfparsing-big-font.pdf differ diff --git a/examples/strong_scaling.ipynb b/examples/strong_scaling.ipynb index ef31a13..2ca2059 100644 --- a/examples/strong_scaling.ipynb +++ b/examples/strong_scaling.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 122, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -54,16 +54,16 @@ }, { "cell_type": "code", - "execution_count": 126, + "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ + "/System/Library/Fonts/Avenir.ttc\n", "/System/Library/Fonts/Avenir Next.ttc\n", - "/System/Library/Fonts/Avenir Next Condensed.ttc\n", - "/System/Library/Fonts/Avenir.ttc\n" + "/System/Library/Fonts/Avenir Next Condensed.ttc\n" ] } ], @@ -85,6 +85,14 @@ " # font_manager.fontManager.ttflist.extend(fontpath)\n", " plt.rcParams[\"font.family\"] = \"Avenir\"\n", "\n", + "# Set font sizes globally\n", + "plt.rcParams[\"font.size\"] = 24\n", + "plt.rcParams[\"axes.titlesize\"] = 24\n", + "plt.rcParams[\"axes.labelsize\"] = 18\n", + "plt.rcParams[\"xtick.labelsize\"] = 16\n", + "plt.rcParams[\"ytick.labelsize\"] = 16\n", + "plt.rcParams[\"legend.fontsize\"] = 16\n", + "\n", "\n", "def ideal_scaling(x_values: list[Any], y0: float) -> list[Any]:\n", " \"\"\"\n", @@ -111,7 +119,12 @@ " # plt.rcParams[\"font.family\"] = \"Avenir Regular\"\n", " plt.rcParams[\"font.size\"] = 14\n", " markers = [\"o\", \"s\", \"d\", \"p\", \"*\", \"v\", \"^\", \"<\"]\n", - " colors = [\"mediumpurple\", \"cornflowerblue\", \"mediumaquamarine\", \"lightcoral\"]\n", + " colors = [\n", + " \"mediumpurple\",\n", + " \"cornflowerblue\",\n", + " \"mediumaquamarine\",\n", + " \"lightcoral\",\n", + " ]\n", " fig, ax = plt.subplots(figsize=(8, 6))\n", " for x, y, label, marker, color in zip(x_values, y_values, labels, markers, colors):\n", " ax.plot(x, y, label=label, marker=marker, color=color)\n", @@ -494,18 +507,27 @@ "sunspot_ngpus = [1 * 12, 4 * 12, 16 * 12, 32 * 12, 96 * 12]\n", "\n", "x_values = [polaris_ngpus, sunspot_ngpus]\n", - "y_values = [polaris_semantic_chunking_throughput, sunspot_semantic_chunking_throughput]\n", + "y_values = [\n", + " polaris_semantic_chunking_throughput,\n", + " sunspot_semantic_chunking_throughput,\n", + "]\n", "labels = [\"Polaris Semantic Chunking\", \"Sunspot Semantic Chunking\"]\n", "image_name = \"scaling_relations_semantic_chunking.pdf\"\n", "plot_scaling_relations(x_values, y_values, labels, image_name)\n", "\n", - "print(\"Polaris Semantic Chunking Throughput:\", polaris_semantic_chunking_throughput)\n", - "print(\"Sunspot Semantic Chunking Throughput:\", sunspot_semantic_chunking_throughput)" + "print(\n", + " \"Polaris Semantic Chunking Throughput:\",\n", + " polaris_semantic_chunking_throughput,\n", + ")\n", + "print(\n", + " \"Sunspot Semantic Chunking Throughput:\",\n", + " sunspot_semantic_chunking_throughput,\n", + ")" ] }, { "cell_type": "code", - "execution_count": 128, + "execution_count": 11, "metadata": {}, "outputs": [ { @@ -1061,7 +1083,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/74/4jdnr7zn79q0h8cj7fy26vjm0000gn/T/ipykernel_47408/3899384454.py:66: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown\n", + "/var/folders/74/4jdnr7zn79q0h8cj7fy26vjm0000gn/T/ipykernel_62422/4207717623.py:83: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown\n", " plt.show()\n" ] } @@ -1120,7 +1142,16 @@ "\n", "polaris_oreo_ngpus = [2 * 4, 32 * 4, 64 * 4, 128 * 4, 256 * 4]\n", "polaris_nougat_ngpus = [2 * 4, 32 * 4, 64 * 4, 128 * 4, 256 * 4]\n", - "sunspot_ngpus = [1 * 12, 2 * 12, 4 * 12, 8 * 12, 16 * 12, 32 * 12, 64 * 12, 96 * 12]\n", + "sunspot_ngpus = [\n", + " 1 * 12,\n", + " 2 * 12,\n", + " 4 * 12,\n", + " 8 * 12,\n", + " 16 * 12,\n", + " 32 * 12,\n", + " 64 * 12,\n", + " 96 * 12,\n", + "]\n", "\n", "x_values = [polaris_oreo_ngpus, polaris_nougat_ngpus, sunspot_ngpus]\n", "y_values = [\n", @@ -1129,7 +1160,7 @@ " sunspot_nougat_throughput,\n", "]\n", "labels = [\"Polaris Oreo\", \"Polaris Nougat\", \"Sunspot Nougat\"]\n", - "image_name = \"scaling_relations_pdfparsing.pdf\"\n", + "image_name = \"scaling_relations_pdfparsing-big-font.pdf\"\n", "plot_scaling_relations(x_values, y_values, labels, image_name)\n", "\n", "print(\"Polaris Oreo Throughout: \", polaris_oreo_throughput)\n", @@ -1304,7 +1335,16 @@ ], "source": [ "polaris_nougat_ngpus = [2 * 4, 32 * 4, 64 * 4, 128 * 4, 256 * 4]\n", - "sunspot_ngpus = [1 * 12, 2 * 12, 4 * 12, 8 * 12, 16 * 12, 32 * 12, 64 * 12, 96 * 12]\n", + "sunspot_ngpus = [\n", + " 1 * 12,\n", + " 2 * 12,\n", + " 4 * 12,\n", + " 8 * 12,\n", + " 16 * 12,\n", + " 32 * 12,\n", + " 64 * 12,\n", + " 96 * 12,\n", + "]\n", "\n", "print(\"Polaris Accelerators\", polaris_nougat_ngpus)\n", "print(\"Sunspot Accelerators\", sunspot_ngpus)"