[Feature:Autograding] Improve Autograding Histogram#12155
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12155 +/- ##
=========================================
Coverage 21.72% 21.72%
Complexity 9609 9609
=========================================
Files 268 268
Lines 36056 36056
Branches 475 475
=========================================
Hits 7832 7832
Misses 27753 27753
Partials 471 471
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
RyanStyron
left a comment
There was a problem hiding this comment.
The histogram now displays the grades in the proper bucket intervals as intended, however it may be useful to improve the function as whole by not explicitly accounting for the exception where increment is 1. Perhaps an int declared along the lines of const numBuckets = Math.ceil((max - min) / increment) would be more apt for generalization purposes.
I agree that the function might be generalized and improved overall, however it may be best to do this in a future PR. If this PR is working as intended to resolve the issue linked, I believe we should move forward with it for now. |
That is fair. Will approve. |
Why is this Change Important & Necessary?
Fixes #12133
Currently, when someone specifies a bucket size of 1 on the autograding histogram with scores 0...n, the histogram has n buckets. Scores for n-1 and n are grouped together into the same final bucket.
(Before)

What is the New Behavior?
Now, the histogram will make n+1 buckets when bucket size = 1. Also, the final score label on the x-axis will be simply n, instead of "n <= n", which was logically correct but did not look clean.
(After)

What steps should a reviewer take to reproduce or test the bug or new feature?
Automated Testing & Documentation
Other information
This is not a breaking change.