-
Notifications
You must be signed in to change notification settings - Fork 19
Skip the bmk scores that were not run during the partial runtime of SPEC #20
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
base: graphmaker
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -171,12 +171,19 @@ def compute_weighted_metrics(csv_path: str, js_path: str, out_csv: str, args): | |
| print(weighted_df.loc[bmk]) | ||
| score[bmk]['time'] = float(weighted_df.loc[bmk, 'time']) | ||
| score[bmk]['ref_time'] = float(reftime_js[bmk]) | ||
| if score[bmk]['time'] == 0: | ||
| warnings.warn(f'{bmk} has 0 time, skip scoring') | ||
| print(f'{bmk} has 0 time, skip scoring') | ||
| score[bmk]['score'] = 0 | ||
| score[bmk]['coverage'] = 0 | ||
| continue | ||
|
Comment on lines
+174
to
+179
|
||
| score[bmk]['score'] = score[bmk]['ref_time'] / score[bmk]['time'] | ||
| score[bmk]['coverage'] = weighted_df.loc[bmk, 'coverage'] | ||
| valid_scores = [x[1]['score'] for x in score.items() if x[1]['score'] != 0] | ||
| score['mean'] = { | ||
| 'time':0, | ||
| 'ref_time':0, | ||
| 'score': geometric_mean([x[1]['score'] for x in score.items()]), | ||
| 'score': geometric_mean(valid_scores) if valid_scores else 0, | ||
|
Comment on lines
+182
to
+186
|
||
| 'coverage':0 | ||
| } | ||
| score_col = ['time','ref_time','score','coverage'] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weighted_dfis reindexed to the full SPEC list earlier, so benchmarks that were not run will typically have NaNtime(not 0).float(np.nan)yieldsnan, so this branch won’t trigger and you’ll computeref_time / nan(propagating NaNs into downstream stats). Consider treating missing/non-finite times as “not run” (e.g.,pd.isna/np.isfinitechecks) and skipping scoring for those rows too.