Skip to content

Commit 9ec8a91

Browse files
committed
format
1 parent 9bb9a71 commit 9ec8a91

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

scoring/score_submissions.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676

7777

7878
def get_summary_df(workload, workload_df, include_test_split=False):
79-
print(f" WORKLOAD: {workload}")
79+
print(f' WORKLOAD: {workload}')
8080
validation_metric, validation_target = (
8181
scoring_utils.get_workload_metrics_and_targets(workload, split='validation')
8282
)
@@ -128,13 +128,17 @@ def get_summary_df(workload, workload_df, include_test_split=False):
128128
# compute the step times
129129
def delta(series):
130130
return series.shift(1, fill_value=0) - series
131+
131132
accumulated_time_intervals = delta(workload_df['accumulated_submission_time'])
132133
step_intervals = delta(workload_df['global_step'])
133134
if len(accumulated_time_intervals) < 2:
134-
print(f"WARNING: The number of evals may be too low to calculate reliable step time for {workload}")
135-
136-
summary_df['step_time (s)'] = np.median((accumulated_time_intervals / step_intervals).iloc[0])
135+
print(
136+
f'WARNING: The number of evals may be too low to calculate reliable step time for {workload}'
137+
)
137138

139+
summary_df['step_time (s)'] = np.median(
140+
(accumulated_time_intervals / step_intervals).iloc[0]
141+
)
138142

139143
summary_df['step_hint'] = scoring_utils.get_workload_stephint(workload)
140144

0 commit comments

Comments
 (0)