Skip to content

Commit ef77fc4

Browse files
Merge pull request #793 from mlcommons/dev
Dev -> main
2 parents a23b5ea + 6f18bcf commit ef77fc4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

scoring/score_submissions.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,15 @@ def get_summary_df(workload, workload_df, include_test_split=False):
8888
summary_df['time to best eval on val (s)'] = workload_df.apply(
8989
lambda x: x['accumulated_submission_time'][x['index best eval on val']],
9090
axis=1)
91-
summary_df['time to target on val (s)'] = summary_df.apply(
92-
lambda x: x['time to best eval on val (s)']
93-
if x['val target reached'] else np.inf,
91+
workload_df['val target reached'] = workload_df[validation_metric].apply(
92+
lambda x: target_op(x, validation_target)).apply(np.any)
93+
workload_df['index to target on val'] = workload_df.apply(
94+
lambda x: np.argmax(target_op(x[validation_metric], validation_target))
95+
if x['val target reached'] else np.nan,
96+
axis=1)
97+
summary_df['time to target on val (s)'] = workload_df.apply(
98+
lambda x: x['accumulated_submission_time'][int(x[
99+
'index to target on val'])] if x['val target reached'] else np.inf,
94100
axis=1)
95101

96102
# test metrics

0 commit comments

Comments
 (0)