Skip to content

Commit e3099b2

Browse files
Niccolo-Ajroldiaahladc
authored andcommitted
adjust Markdown table (formatting broken)
1 parent 930a40e commit e3099b2

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

scoring/score_submissions.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def get_summary_df(workload, workload_df, include_test_split=False):
127127

128128
# compute the step times
129129
def delta(series):
130-
return series.shift(1, fill_value=0) - series
130+
return series.apply(lambda x: np.diff(x, prepend=0))
131131

132132
accumulated_time_intervals = delta(workload_df['accumulated_submission_time'])
133133
step_intervals = delta(workload_df['global_step'])
@@ -136,9 +136,12 @@ def delta(series):
136136
f'WARNING: The number of evals may be too low to calculate reliable step time for {workload}'
137137
)
138138

139-
summary_df['step_time (s)'] = np.median(
140-
(accumulated_time_intervals / step_intervals).iloc[0]
141-
)
139+
# Flatten all intervals from all trials and take the global median
140+
with np.errstate(divide='ignore', invalid='ignore'):
141+
all_ratios = np.concatenate(
142+
(accumulated_time_intervals / step_intervals).values
143+
)
144+
summary_df['step_time (s)'] = np.nanmedian(all_ratios)
142145

143146
summary_df['step_hint'] = scoring_utils.get_workload_stephint(workload)
144147

0 commit comments

Comments
 (0)