Skip to content

Commit 4d8c2c8

Browse files
committed
add counting of datasets
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
1 parent ec001e0 commit 4d8c2c8

22 files changed

Lines changed: 86691 additions & 5091 deletions

experiments/azure/aks/cpu/size128/results/mixbench/mixbench-iter-1-1344106659840.out

Lines changed: 0 additions & 4 deletions
This file was deleted.

paper/amg2023/1-run-analysis.py

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def parse_data(indir, outdir, files):
114114
"""
115115
# metrics here will be figures of merit, and seconds runtime
116116
p = ps.ResultParser("amg2023")
117-
117+
118118
# For flux we can save jobspecs and other event data
119119
data = {}
120120

@@ -226,13 +226,21 @@ def plot_results(df, outdir, non_anon=False, log=True):
226226

227227
fig, axes = plt.subplots(1, 2, sharey=True, figsize=(18, 3.3))
228228

229+
fig = plt.figure(figsize=(18, 3.3))
230+
gs = plt.GridSpec(1, 3, width_ratios=[2, 2, 1])
231+
axes = []
232+
axes.append(fig.add_subplot(gs[0, 0]))
233+
axes.append(fig.add_subplot(gs[0, 1]))
234+
axes.append(fig.add_subplot(gs[0, 2]))
235+
229236
sns.set_style("whitegrid")
230237
sns.barplot(
231238
data_frames["cpu"],
232239
ax=axes[0],
233240
x="nodes",
234241
y="value",
235242
hue="experiment",
243+
err_kws={'color': 'darkred'},
236244
hue_order=[
237245
"google/gke/cpu",
238246
"google/compute-engine/cpu",
@@ -261,6 +269,7 @@ def plot_results(df, outdir, non_anon=False, log=True):
261269
ax=axes[1],
262270
x="gpu_count",
263271
y="value",
272+
err_kws={'color': 'darkred'},
264273
hue="experiment",
265274
hue_order=[
266275
"google/compute-engine/gpu",
@@ -275,13 +284,18 @@ def plot_results(df, outdir, non_anon=False, log=True):
275284
)
276285
axes[1].set_title("FOM Overall (GPU)", fontsize=14)
277286
axes[1].set_xlabel("GPU Count", fontsize=14)
287+
axes[1].set_ylabel("")
278288
if log:
279289
axes[1].set_yscale("log")
280290

281-
# Remove legend title, don't need it
282-
for ax in axes:
283-
handles, labels = ax.get_legend_handles_labels()
284-
ax.legend(handles=handles, labels=labels)
291+
handles, labels = axes[1].get_legend_handles_labels()
292+
labels = ["/".join(x.split("/")[0:2]) for x in labels]
293+
axes[2].legend(
294+
handles, labels, loc="center left", bbox_to_anchor=(-0.1, 0.5), frameon=False
295+
)
296+
for ax in axes[0:2]:
297+
ax.get_legend().remove()
298+
axes[2].axis("off")
285299

286300
plt.tight_layout()
287301
if log:
@@ -290,6 +304,9 @@ def plot_results(df, outdir, non_anon=False, log=True):
290304
plt.savefig(os.path.join(img_outdir, "amg-fom-overall-cpu-gpu.svg"))
291305
plt.clf()
292306

307+
# Print the total number of data points
308+
print(f'Total number of CPU datum: {data_frames["cpu"].shape[0]}')
309+
print(f'Total number of GPU datum: {data_frames["gpu"].shape[0]}')
293310

294311
if __name__ == "__main__":
295312
main()

0 commit comments

Comments
 (0)