Skip to content

Commit

Permalink
Impute with runtime budget (not +1)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsschneider committed Sep 30, 2024
1 parent 6ce8ff9 commit 24e0c92
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 12 deletions.
2 changes: 1 addition & 1 deletion scoring/compute_speedups.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def replace_inf(row):
# Factor of 3 for self-tuning ruleset
factor = 3 if FLAGS.self_tuning_ruleset else 1
max_runtime_workload = factor * MAX_BUDGETS[workload_name]
row.replace(np.inf, max_runtime_workload + 1, inplace=True)
row.replace(np.inf, max_runtime_workload, inplace=True)
return row


Expand Down
61 changes: 50 additions & 11 deletions scoring/plotting_speedups.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"outputs": [],
"source": [
"# Load results from disk\n",
"SELF_TUNING = True\n",
"SELF_TUNING = False\n",
"results_path = '../../results/'\n",
"file_path = 'self_tuning/self_tuning_scoring_results.txt' if SELF_TUNING else 'external_tuning/external_tuning_scoring_results.txt'\n",
"RESULTS_FILE = os.path.join(results_path, file_path)\n",
Expand All @@ -41,9 +41,43 @@
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING:absl:Expecting 5 studies for workload librispeech_conformer_layernorm_pytorch but found 4 studies for AdamG.\n",
"WARNING:absl:Expecting 14 workloads but found 12 workloads for sinv6_75.\n",
"WARNING:absl:Expecting 14 workloads but found 12 workloads for sinv6.\n"
"WARNING:absl:Expecting 14 workloads but found 18 workloads for prize_qualification_baseline.\n",
"WARNING:absl:Expecting 5 studies for workload criteo1tb_layernorm_jax but found 3 studies for prize_qualification_baseline.\n",
"WARNING:absl:Expecting 5 studies for workload fastmri_model_size_jax but found 3 studies for prize_qualification_baseline.\n",
"WARNING:absl:In Study study_1: Expecting 5 trials for workload fastmri_model_size_jax but found 4 trials for prize_qualification_baseline.\n",
"WARNING:absl:In Study study_2: Expecting 5 trials for workload fastmri_model_size_jax but found 4 trials for prize_qualification_baseline.\n",
"WARNING:absl:In Study study_4: Expecting 5 trials for workload fastmri_model_size_jax but found 4 trials for prize_qualification_baseline.\n",
"WARNING:absl:Expecting 5 studies for workload imagenet_resnet_silu_jax but found 4 studies for prize_qualification_baseline.\n",
"WARNING:absl:In Study study_1: Expecting 5 trials for workload imagenet_resnet_silu_jax but found 1 trials for prize_qualification_baseline.\n",
"WARNING:absl:In Study study_2: Expecting 5 trials for workload imagenet_resnet_silu_jax but found 1 trials for prize_qualification_baseline.\n",
"WARNING:absl:In Study study_3: Expecting 5 trials for workload imagenet_resnet_silu_jax but found 1 trials for prize_qualification_baseline.\n",
"WARNING:absl:In Study study_4: Expecting 5 trials for workload imagenet_resnet_silu_jax but found 1 trials for prize_qualification_baseline.\n",
"WARNING:absl:Expecting 5 studies for workload ogbg_gelu_jax but found 3 studies for prize_qualification_baseline.\n",
"WARNING:absl:Expecting 14 workloads but found 11 workloads for caspr_adaptive.\n",
"WARNING:absl:Expecting 14 workloads but found 12 workloads for schedule_free_prodigy.\n",
"WARNING:absl:In Study study_0: Expecting 5 trials for workload criteo1tb_embed_init_jax but found 1 trials for amos.\n",
"WARNING:absl:In Study study_1: Expecting 5 trials for workload criteo1tb_embed_init_jax but found 1 trials for amos.\n",
"WARNING:absl:In Study study_2: Expecting 5 trials for workload criteo1tb_embed_init_jax but found 1 trials for amos.\n",
"WARNING:absl:In Study study_3: Expecting 5 trials for workload criteo1tb_embed_init_jax but found 1 trials for amos.\n",
"WARNING:absl:In Study study_4: Expecting 5 trials for workload criteo1tb_embed_init_jax but found 1 trials for amos.\n",
"WARNING:absl:In Study study_0: Expecting 5 trials for workload criteo1tb_jax but found 1 trials for amos.\n",
"WARNING:absl:In Study study_1: Expecting 5 trials for workload criteo1tb_jax but found 1 trials for amos.\n",
"WARNING:absl:In Study study_2: Expecting 5 trials for workload criteo1tb_jax but found 1 trials for amos.\n",
"WARNING:absl:In Study study_3: Expecting 5 trials for workload criteo1tb_jax but found 1 trials for amos.\n",
"WARNING:absl:In Study study_4: Expecting 5 trials for workload criteo1tb_jax but found 1 trials for amos.\n",
"WARNING:absl:In Study study_1: Expecting 5 trials for workload librispeech_conformer_layernorm_pytorch but found 4 trials for lawa_ema.\n",
"WARNING:absl:In Study study_2: Expecting 5 trials for workload librispeech_conformer_layernorm_pytorch but found 3 trials for lawa_ema.\n",
"WARNING:absl:In Study study_3: Expecting 5 trials for workload librispeech_conformer_layernorm_pytorch but found 4 trials for lawa_ema.\n",
"WARNING:absl:In Study study_4: Expecting 5 trials for workload librispeech_conformer_layernorm_pytorch but found 4 trials for lawa_ema.\n",
"WARNING:absl:Expecting 5 studies for workload librispeech_deepspeech_pytorch but found 3 studies for lawa_ema.\n",
"WARNING:absl:In Study study_0: Expecting 5 trials for workload librispeech_deepspeech_pytorch but found 1 trials for lawa_ema.\n",
"WARNING:absl:In Study study_1: Expecting 5 trials for workload librispeech_deepspeech_pytorch but found 1 trials for lawa_ema.\n",
"WARNING:absl:In Study study_2: Expecting 5 trials for workload librispeech_deepspeech_pytorch but found 2 trials for lawa_ema.\n",
"WARNING:absl:In Study study_0: Expecting 5 trials for workload criteo1tb_embed_init_pytorch but found 4 trials for lawa_queue.\n",
"WARNING:absl:In Study study_0: Expecting 5 trials for workload criteo1tb_pytorch but found 4 trials for lawa_queue.\n",
"WARNING:absl:In Study study_3: Expecting 5 trials for workload imagenet_vit_pytorch but found 4 trials for lawa_queue.\n",
"WARNING:absl:In Study study_2: Expecting 5 trials for workload librispeech_conformer_layernorm_pytorch but found 4 trials for lawa_queue.\n",
"WARNING:absl:In Study study_3: Expecting 5 trials for workload librispeech_conformer_layernorm_pytorch but found 4 trials for lawa_queue.\n"
]
}
],
Expand Down Expand Up @@ -89,8 +123,8 @@
" # Factor of 3 for self-tuning ruleset\n",
" factor = 3 if SELF_TUNING else 1\n",
" max_runtime_workload = factor * MAX_BUDGETS[workload_name]\n",
" row.replace(np.inf, max_runtime_workload + 1, inplace=True)\n",
" row.replace(np.nan, max_runtime_workload + 1, inplace=True)\n",
" row.replace(np.inf, max_runtime_workload, inplace=True)\n",
" row.replace(np.nan, max_runtime_workload, inplace=True)\n",
" return row"
]
},
Expand All @@ -108,12 +142,17 @@
"workload & speedup \\\\\n",
"submission & \\\\\n",
"\\midrule\n",
"\\sfadam & +7.76\\% \\\\\n",
"\\shampoosub & +27.87\\% \\\\\n",
"\\sfadam & +26.60\\% \\\\\n",
"\\caspr & +24.33\\% \\\\\n",
"\\generalizedadam & +10.89\\% \\\\\n",
"\\cycliclr & +10.67\\% \\\\\n",
"\\lawaq & +7.98\\% \\\\\n",
"\\nadamp & +3.37\\% \\\\\n",
"\\amos & +1.46\\% \\\\\n",
"\\baseline & -0.00\\% \\\\\n",
"\\nadamwseq & -92.44\\% \\\\\n",
"\\sinvnum & -157.67\\% \\\\\n",
"\\sinv & -168.63\\% \\\\\n",
"\\adamg & -294.17\\% \\\\\n",
"\\lawaema & -9.17\\% \\\\\n",
"\\sfprodigy & -15.68\\% \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n"
Expand Down

0 comments on commit 24e0c92

Please sign in to comment.