Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scoring bug in get_summary_df #792

Merged
merged 8 commits into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions scoring/score_submissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,15 @@ def get_summary_df(workload, workload_df, include_test_split=False):
summary_df['time to best eval on val (s)'] = workload_df.apply(
lambda x: x['accumulated_submission_time'][x['index best eval on val']],
axis=1)
summary_df['time to target on val (s)'] = summary_df.apply(
lambda x: x['time to best eval on val (s)']
if x['val target reached'] else np.inf,
workload_df['val target reached'] = workload_df[validation_metric].apply(
lambda x: target_op(x, validation_target)).apply(np.any)
workload_df['index to target on val'] = workload_df.apply(
lambda x: np.argmax(target_op(x[validation_metric], validation_target))
if x['val target reached'] else np.nan,
axis=1)
summary_df['time to target on val (s)'] = workload_df.apply(
lambda x: x['accumulated_submission_time'][int(x[
'index to target on val'])] if x['val target reached'] else np.inf,
axis=1)

# test metrics
Expand Down
Loading