Autograding - How to assign a custom score based on the number of passes for autograding within a test for the auto grading reporter #161746
Replies: 3 comments 3 replies
-
Hey GitHub Classroom’s Autograding currently supports only binary scoring per test either full points or zero, based on pass/fail. It doesn’t natively support partial scoring within a single test (e.g., assigning custom scores based on how many sub-cases pass). You can try to split the test into multiple smaller tests, each with its own score. This gives more granular control. Use a custom script to calculate partial scores, then print results in a format for manual review—though these won’t reflect in the official summary table. |
Beta Was this translation helpful? Give feedback.
-
You're right — writing 100 separate tests for each threshold is not practical. Instead, calculate the accuracy in a single test script, then output the score to a file (like score.txt). While GitHub Autograding can't show that score directly in the summary, you can download the file for manual grading or aggregate scores later. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I have a question regarding the Autograding in GitHub. I would like to know how I could assign a custom value to the test score in the Test runner summary at using Autograding. For a single test, we could set a maximum score and the test score will be given zero or all depending on the failure or success. Even though there are several failures within a single test, I would like to assign a custom score value to the Test Score in the Test runner summary table. One can test a single function with varying input using DDP packages, but there is only two choices, zero or the maximum score, for the test.
It would be appreciated if anyone could give advices on this matter!
Beta Was this translation helpful? Give feedback.
All reactions