Skip to content

Commit 1645d1f

Browse files
committed
update step time calculation
1 parent de6bb76 commit 1645d1f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

scoring/score_submissions.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,14 @@ def get_summary_df(workload, workload_df, include_test_split=False):
119119
axis=1,
120120
)
121121

122-
summary_df['step_time (s)'] = (
123-
workload_df['accumulated_submission_time'] / workload_df['global_step']
124-
).iloc[-1][-1]
122+
# compute the step times
123+
def delta(series):
124+
return series.shift(1, fill_value=0) - series
125+
accumulated_time_intervals = delta(workload_df['accumulated_submission_time'])
126+
step_intervals = delta(workload_df['global_step'])
127+
128+
summary_df['step_time (s)'] = np.median((accumulated_time_intervals / step_intervals).iloc[0])
129+
125130

126131
summary_df['step_hint'] = scoring_utils.get_workload_stephint(workload)
127132

0 commit comments

Comments
 (0)