Skip to content

Commit

Permalink
save time to target df in scoring
Browse files Browse the repository at this point in the history
  • Loading branch information
priyakasimbeg committed Oct 16, 2024
1 parent ef77fc4 commit ce1003e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions scoring/performance_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,8 @@ def compute_performance_profiles(submissions,
scale='linear',
verbosity=0,
strict=False,
self_tuning_ruleset=False):
self_tuning_ruleset=False,
output_dir=None):
"""Compute performance profiles for a set of submission by some time column.
Args:
Expand Down Expand Up @@ -320,7 +321,9 @@ def compute_performance_profiles(submissions,
df = df[BASE_WORKLOADS + HELDOUT_WORKLOADS]
# Sort workloads alphabetically (for better display)
df = df.reindex(sorted(df.columns), axis=1)


# Save time to target dataframe
df.to_csv(os.path.join(output_dir, 'time_to_targets.csv'))
# For each held-out workload set to inf if the base workload is inf or nan
for workload in df.keys():
if workload not in BASE_WORKLOADS:
Expand Down
3 changes: 2 additions & 1 deletion scoring/score_submissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ def main(_):
scale='linear',
verbosity=0,
self_tuning_ruleset=FLAGS.self_tuning_ruleset,
strict=FLAGS.strict)
strict=FLAGS.strict,
output_dir=FLAGS.output_dir,)
if not os.path.exists(FLAGS.output_dir):
os.mkdir(FLAGS.output_dir)
performance_profile.plot_performance_profiles(
Expand Down

0 comments on commit ce1003e

Please sign in to comment.