-
Notifications
You must be signed in to change notification settings - Fork 219
Add option to use latest directory and add run printing #1586
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: main
Are you sure you want to change the base?
Conversation
12e26af
to
b9172e4
Compare
Adds two features to the autogroup.py script, namely - the possibility to print either the numbers of all runs of a category (ordered descendingly by throughput), when specifying `--runs=all`, or just to print max, median and min run numbers `--runs=tri` - makes default order of throughputs consistent with sorting order if runs are specified - adds possibility to use print the latest run (by default latest is inferred from the run number, but can also be switched to modification time). Additionally, with `--latest=K` the k-th latest run acording to the specified order is picked. Signed-off-by: Christian Hagemeier <chagem@amazon.com>
Signed-off-by: Christian Hagemeier <chagem@amazon.com>
Signed-off-by: Christian Hagemeier <chagem@amazon.com>
Signed-off-by: Christian Hagemeier <chagem@amazon.com>
ac44bf2
to
137139b
Compare
|
||
# Add run numbers column if requested | ||
if args.runs: | ||
sorted_by_throughput = sorted(zip(throughputs, run_numbers), reverse=True) |
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.
Isn't zip(throughputs, run_numbers)
equivalent to throughput_data
?
selected_runs = [max_run, median_run, min_run] | ||
# Remove duplicates while preserving order using dict.fromkeys() | ||
# (works in python > 3.7) | ||
unique_runs = list(dict.fromkeys(selected_runs)) |
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.
I think your previous approach was more readable 😅
Perhaps just move it to a function instead?
|
||
row.append(",".join(unique_runs)) | ||
else: | ||
all_runs = [r for _, r in sorted_by_throughput] |
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.
Isn't this run_numbers
?
Adds two features to the autogroup.py script, namely
--runs=all
, or just to print max, median and min run numbers--runs=rep
(for representative)Only changes behaviour of the benchmarking autogroup script, so no Changelog entries / version bumps needed.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).