Skip to content

[Feature:Autograding] Improve Autograding Histogram#12155

Merged
bmcutler merged 4 commits intomainfrom
fix-autograded-histogram-buckets
Nov 14, 2025
Merged

[Feature:Autograding] Improve Autograding Histogram#12155
bmcutler merged 4 commits intomainfrom
fix-autograded-histogram-buckets

Conversation

@Rkoester47
Copy link
Contributor

@Rkoester47 Rkoester47 commented Oct 24, 2025

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)
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)
After

What steps should a reviewer take to reproduce or test the bug or new feature?

  1. Visit a gradeable > preview grading/regrade
  2. Select "statistics & charts" > "autograding histrogram"
  3. Specify a bucket size of 1
  4. Verify that there are n + 1 number of buckets, and the final bucket is
  5. labeled simply as the highest score possible ("10" instead of "10 <= 10")

Automated Testing & Documentation

Other information

This is not a breaking change.

@github-project-automation github-project-automation bot moved this to Seeking Reviewer in Submitty Development Oct 24, 2025
@automateprojectmangement automateprojectmangement bot moved this from Seeking Reviewer to Work in Progress in Submitty Development Oct 24, 2025
@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.72%. Comparing base (77b417f) to head (df514ef).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            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           
Flag Coverage Δ
autograder 21.39% <ø> (ø)
js 2.07% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.72% <ø> (ø)
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 90.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Rkoester47 Rkoester47 marked this pull request as ready for review October 28, 2025 01:23
@automateprojectmangement automateprojectmangement bot moved this from Work in Progress to Seeking Reviewer in Submitty Development Oct 28, 2025
@RyanStyron RyanStyron self-requested a review October 28, 2025 19:31
@automateprojectmangement automateprojectmangement bot moved this from Seeking Reviewer to In Review in Submitty Development Oct 28, 2025
Copy link
Contributor

@RyanStyron RyanStyron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-project-automation github-project-automation bot moved this from In Review to Work in Progress in Submitty Development Oct 31, 2025
@Rkoester47
Copy link
Contributor Author

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.

@RyanStyron
Copy link
Contributor

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.

@github-project-automation github-project-automation bot moved this from Work in Progress to Awaiting Maintainer Review in Submitty Development Nov 11, 2025
@Rkoester47 Rkoester47 moved this from Awaiting Maintainer Review to Ready to Merge in Submitty Development Nov 13, 2025
@bmcutler bmcutler merged commit dcc7cfe into main Nov 14, 2025
25 checks passed
@bmcutler bmcutler deleted the fix-autograded-histogram-buckets branch November 14, 2025 00:27
@github-project-automation github-project-automation bot moved this from Ready to Merge to Done in Submitty Development Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Off by one error in autograding histogram

3 participants