{ "cells": [ { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1.9825750242013553" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "81920 / 41320" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "from IPython.core.interactiveshell import InteractiveShell\n", "from IPython.display import display, Markdown, SVG, HTML\n", "import pandas as pd\n", "import altair as alt\n", "import re\n", "import pickle\n", "from utils import seconds_to_ms, ms_to_seconds\n", "from benchmark_result import get_benchmark_results, BenchmarkType, SchedulerType, get_broadcast_source, get_async_source, get_push_source\n", "from benchmarks.utils import echo\n", "from benchmarks.throughput import make_benchmark, make_multiple_message_benchmark, make_push_benchmark" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [], "source": [ "#benchmark_results = get_benchmark_results()\n", "from benchmark_result import BenchmarkResult, Result \n", "with open('saved_results.pkl', 'rb') as saved_results:\n", " benchmark_results = pickle.load(saved_results)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# time_push" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This benchmark comes from benchmarking the runtime of sending arrays of various size to different numbers of engines and returning None." ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "jupyter": { "source_hidden": true } }, "outputs": [ { "data": { "text/plain": [ "\u001b[0;31mSignature:\u001b[0m \u001b[0mmake_push_benchmark\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mget_view\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mDocstring:\u001b[0m \n", "\u001b[0;31mSource:\u001b[0m \n", "\u001b[0;32mdef\u001b[0m \u001b[0mmake_push_benchmark\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mget_view\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0;32mclass\u001b[0m \u001b[0mPushMessageSuite\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0mparam_names\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m'Number of engines'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'Number of bytes'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0mtimer\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtimeit\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdefault_timer\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0mtimeout\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m120\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0mparams\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mengines\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbyte_param\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0mview\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0mclient\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0msetup\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnumber_of_engines\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnumber_of_bytes\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclient\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mipp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mClient\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprofile\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'asv'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mview\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mget_view\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mview\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtargets\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlist\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnumber_of_engines\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0mwait_for\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;32mlambda\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclient\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m>=\u001b[0m \u001b[0mnumber_of_engines\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mtime_broadcast\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mengines\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnumber_of_bytes\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0mreply\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mview\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply_sync\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0;32mlambda\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0marray\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0mnumber_of_bytes\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mint8\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mteardown\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclient\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclient\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclose\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\n", "\u001b[0;34m\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mPushMessageSuite\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mFile:\u001b[0m ~/ipyparallel_master_project/benchmarks/throughput.py\n", "\u001b[0;31mType:\u001b[0m function\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "??make_push_benchmark\n" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "jupyter": { "source_hidden": true } }, "outputs": [], "source": [ "source = get_push_source(benchmark_results)" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "jupyter": { "source_hidden": true } }, "outputs": [], "source": [ "dview = pd.DataFrame(source['DirectView']) \n", "dview['Scheduler name'] = 'DirectView'\n", "dview['Speedup'] = 1" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "jupyter": { "source_hidden": true } }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Duration in msNumber of bytesNumber of enginesScheduler nameSpeedup
06.3010001DirectView1.000000
18.15100001DirectView1.000000
212.971000001DirectView1.000000
381.4110000001DirectView1.000000
4158.5720000001DirectView1.000000
..................
35577.7110001024NonCoalescing1.142511
36598.62100001024NonCoalescing1.082156
37597.031000001024NonCoalescing1.319331
38666.2010000001024NonCoalescing2.073837
39806.0020000001024NonCoalescing3.242618
\n", "

120 rows × 5 columns

\n", "
" ], "text/plain": [ " Duration in ms Number of bytes Number of engines Scheduler name \\\n", "0 6.30 1000 1 DirectView \n", "1 8.15 10000 1 DirectView \n", "2 12.97 100000 1 DirectView \n", "3 81.41 1000000 1 DirectView \n", "4 158.57 2000000 1 DirectView \n", ".. ... ... ... ... \n", "35 577.71 1000 1024 NonCoalescing \n", "36 598.62 10000 1024 NonCoalescing \n", "37 597.03 100000 1024 NonCoalescing \n", "38 666.20 1000000 1024 NonCoalescing \n", "39 806.00 2000000 1024 NonCoalescing \n", "\n", " Speedup \n", "0 1.000000 \n", "1 1.000000 \n", "2 1.000000 \n", "3 1.000000 \n", "4 1.000000 \n", ".. ... \n", "35 1.142511 \n", "36 1.082156 \n", "37 1.319331 \n", "38 2.073837 \n", "39 3.242618 \n", "\n", "[120 rows x 5 columns]" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "datas = []\n", "for scheduler_name, scheduler_results in source.items():\n", " data = pd.DataFrame(scheduler_results) \n", " data['Scheduler name'] = scheduler_name\n", " data['Speedup'] = dview['Duration in ms'] / data['Duration in ms']\n", " datas.append(data)\n", "data = pd.concat(datas)\n", "data" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "ldata = data[data['Number of bytes'] == 2000_000]\n", "alt.Chart(ldata).mark_line(point=True).encode(\n", " alt.X(\n", " 'Number of engines',\n", " scale=alt.Scale(type='log', base=2)\n", " ),\n", " alt.Y(\n", " 'Duration in ms',\n", " scale=alt.Scale(type='log')\n", " ),\n", " color='Scheduler name:N',\n", " tooltip='Duration in ms',\n", ").configure_axis(labelFontSize=20, titleFontSize=20).properties(title='Runtime of apply using DirectView', width=1080).interactive().display(renderer='svg')" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Duration in msNumber of bytesNumber of enginesScheduler nameSpeedup
35660.0410001024DirectView1.000000
36647.80100001024DirectView1.000000
37787.681000001024DirectView1.000000
381381.5910000001024DirectView1.000000
392613.5520000001024DirectView1.000000
35164.1210001024Coalescing4.021691
36164.27100001024Coalescing3.943508
37173.361000001024Coalescing4.543609
38284.1610000001024Coalescing4.862014
39718.3420000001024Coalescing3.638319
35577.7110001024NonCoalescing1.142511
36598.62100001024NonCoalescing1.082156
37597.031000001024NonCoalescing1.319331
38666.2010000001024NonCoalescing2.073837
39806.0020000001024NonCoalescing3.242618
\n", "
" ], "text/plain": [ " Duration in ms Number of bytes Number of engines Scheduler name \\\n", "35 660.04 1000 1024 DirectView \n", "36 647.80 10000 1024 DirectView \n", "37 787.68 100000 1024 DirectView \n", "38 1381.59 1000000 1024 DirectView \n", "39 2613.55 2000000 1024 DirectView \n", "35 164.12 1000 1024 Coalescing \n", "36 164.27 10000 1024 Coalescing \n", "37 173.36 100000 1024 Coalescing \n", "38 284.16 1000000 1024 Coalescing \n", "39 718.34 2000000 1024 Coalescing \n", "35 577.71 1000 1024 NonCoalescing \n", "36 598.62 10000 1024 NonCoalescing \n", "37 597.03 100000 1024 NonCoalescing \n", "38 666.20 1000000 1024 NonCoalescing \n", "39 806.00 2000000 1024 NonCoalescing \n", "\n", " Speedup \n", "35 1.000000 \n", "36 1.000000 \n", "37 1.000000 \n", "38 1.000000 \n", "39 1.000000 \n", "35 4.021691 \n", "36 3.943508 \n", "37 4.543609 \n", "38 4.862014 \n", "39 3.638319 \n", "35 1.142511 \n", "36 1.082156 \n", "37 1.319331 \n", "38 2.073837 \n", "39 3.242618 " ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ldata = data[data['Number of engines'] == 1024]\n", "ldata" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for scheduler_name in data['Scheduler name'].unique():\n", " scheduler_data = data[data['Scheduler name'] == scheduler_name]\n", " alt.Chart(scheduler_data).mark_line(point=True).encode(\n", " alt.X(\n", " 'Number of bytes',\n", " scale=alt.Scale(type='log')\n", " ),\n", " alt.Y(\n", " 'Duration in ms',\n", " scale=alt.Scale(type='log')\n", "\n", " ),\n", " color='Number of engines:N',\n", " tooltip='Duration in ms',\n", " \n", " ).properties(title=scheduler_name, width=800).interactive().display(renderer='svg')\n" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "ldata = data[data['Number of bytes'] == 1000]\n", "alt.Chart(ldata).mark_line(point=True).encode(\n", " alt.X(\n", " 'Number of engines',\n", " scale=alt.Scale(type='log', base=2)\n", " ),\n", " alt.Y(\n", " 'Duration in ms',\n", " scale=alt.Scale(type='log')\n", " ),\n", " color='Scheduler name:N',\n", " tooltip='Duration in ms',\n", ").configure_axis(labelFontSize=20, titleFontSize=20).properties(title='Runtime of apply using DirectView', width=1080).interactive().display(renderer='svg')" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/markdown": [ "## Results for duration[DirectView]/duration[scheduler]" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "display(Markdown(f'## Results for duration[DirectView]/duration[scheduler]'))\n", "for scheduler_name in data['Scheduler name'].unique():\n", " if scheduler_name == 'DirectView':\n", " continue\n", " alt.Chart(data[data['Scheduler name'] == scheduler_name]).mark_line(point=True).encode(\n", " alt.X(\n", " 'Number of bytes',\n", " scale=alt.Scale(type='log')\n", " ),\n", " alt.Y(\n", " 'Speedup',\n", " ),\n", " color='Number of engines:N',\n", " tooltip='Number of engines',\n", " \n", " ).properties(title=scheduler_name, width=800).interactive().display(renderer='svg')" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "jupyter": { "source_hidden": true } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "data['combined']= data['Scheduler name'] + ' ' + data['Number of bytes'].astype(str)\n", "alt.Chart(data[data['Scheduler name'] != 'DirectView']).mark_line(point=True).encode(\n", " alt.X(\n", " 'Number of engines',\n", " scale=alt.Scale(type='log')\n", " ),\n", " alt.Y(\n", " 'Speedup',\n", " ),\n", " color='Number of bytes:N',\n", " strokeDash=alt.StrokeDash(shorthand='Scheduler name', legend=None),\n", " tooltip='combined',\n", "\n", ").properties(title='schedulers vs directView scaling engines', width=800).interactive().display(renderer='svg')\n" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "jupyter": { "source_hidden": true } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for engine in data['Number of engines'].unique(): \n", " alt.Chart(data[data['Number of engines'] == engine]).mark_bar().encode(\n", " x='Scheduler name',\n", " y='Duration in ms',\n", " color='Scheduler name:N',\n", " column='Number of bytes:N', \n", " tooltip='Duration in ms'\n", " ).properties(title=f'Runtime on {engine} engines:').interactive().display(renderer='svg')" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" } }, "nbformat": 4, "nbformat_minor": 4 }