Skip to content

Commit ce1003e

Browse files
committed
save time to target df in scoring
1 parent ef77fc4 commit ce1003e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

scoring/performance_profile.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ def compute_performance_profiles(submissions,
274274
scale='linear',
275275
verbosity=0,
276276
strict=False,
277-
self_tuning_ruleset=False):
277+
self_tuning_ruleset=False,
278+
output_dir=None):
278279
"""Compute performance profiles for a set of submission by some time column.
279280
280281
Args:
@@ -320,7 +321,9 @@ def compute_performance_profiles(submissions,
320321
df = df[BASE_WORKLOADS + HELDOUT_WORKLOADS]
321322
# Sort workloads alphabetically (for better display)
322323
df = df.reindex(sorted(df.columns), axis=1)
323-
324+
325+
# Save time to target dataframe
326+
df.to_csv(os.path.join(output_dir, 'time_to_targets.csv'))
324327
# For each held-out workload set to inf if the base workload is inf or nan
325328
for workload in df.keys():
326329
if workload not in BASE_WORKLOADS:

scoring/score_submissions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ def main(_):
210210
scale='linear',
211211
verbosity=0,
212212
self_tuning_ruleset=FLAGS.self_tuning_ruleset,
213-
strict=FLAGS.strict)
213+
strict=FLAGS.strict,
214+
output_dir=FLAGS.output_dir,)
214215
if not os.path.exists(FLAGS.output_dir):
215216
os.mkdir(FLAGS.output_dir)
216217
performance_profile.plot_performance_profiles(

0 commit comments

Comments
 (0)