Skip to content

Commit

Permalink
save graphs as pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigo-ceccato committed Aug 14, 2024
1 parent cea6f46 commit eac170b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/bench-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,7 @@ jobs:
spinner -c docs/examples/timeout_test.yaml -r T -e F
- name: Capture output test
run: |
spinner -c docs/examples/capture_output.yaml -r T -e T
spinner -c docs/examples/capture_output.yaml -r T -e T
with:
name: generated graphs
path: output/
14 changes: 11 additions & 3 deletions spinner/exporter/reporter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"source": [
"# Default locations if parameter not passed\n",
"# benchmark_data_path = \"../../.././bench_metadata.pkl\"\n",
"benchmark_data_path = \"/home/users/r176848/remy/spinner/bench_metadata.pkl\""
"benchmark_data_path = \"/home/users/r176848/remy/spinner/bench_metadata.pkl\"\n",
"output_folder = \"./output\""
]
},
{
Expand All @@ -31,6 +32,10 @@
"metadata = benchmark_data[\"metadata\"]\n",
"df = pd.DataFrame(benchmark_data[\"dataframe\"])\n",
"\n",
"# create the output folder if it does not exist\n",
"if not os.path.exists(output_folder):\n",
" os.makedirs(output_folder)\n",
"\n",
"\n",
"rprint(df.columns)\n",
"rprint(df.head())\n",
Expand Down Expand Up @@ -124,8 +129,11 @@
" plt.legend()\n",
"\n",
" plt.title(f\"{title} | {n_runs} runs\")\n",
"# plt.tight_layout()\n",
"plt.show()"
" plt.savefig(f\"{output_folder}/{bench}_{y_ax}_{x_ax}.pdf\")\n",
"\n",
" # plt.tight_layout()\n",
" plt.savefig(f\"{output_folder}/{bench}_{y_ax}_{x_ax}-GROUPED.pdf\")\n",
" plt.show()"
]
}
],
Expand Down

0 comments on commit eac170b

Please sign in to comment.