Skip to content

Commit 5ac8fa6

Browse files
committed
logging warning in utils script
1 parent e09cb4b commit 5ac8fa6

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

scoring/score_submissions.py

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

7777

7878
def get_summary_df(workload, workload_df, include_test_split=False):
79+
print(f" WORKLOAD: {workload}")
7980
validation_metric, validation_target = (
8081
scoring_utils.get_workload_metrics_and_targets(workload, split='validation')
8182
)
@@ -127,12 +128,12 @@ def get_summary_df(workload, workload_df, include_test_split=False):
127128
# compute the step times
128129
def delta(series):
129130
return series.shift(1, fill_value=0) - series
130-
accumulated_time_intervals = delta(workload_df['accumulated_submission_time'])
131-
step_intervals = delta(workload_df['global_step'])
131+
accumulated_time_intervals = delta(workload_df['accumulated_submission_time']) # exclude first step
132+
step_intervals = delta(workload_df['global_step']) # exclude time up to first step
133+
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}")
132135

133136
summary_df['step_time (s)'] = np.median((accumulated_time_intervals / step_intervals).iloc[0])
134-
135-
136137
summary_df['step_hint'] = scoring_utils.get_workload_stephint(workload)
137138

138139
# test metrics

0 commit comments

Comments
 (0)