MUSA Graderv0.1.0

API reference · grader/scoring.py · 228 lines

grader.scoring

Review policy and class-level aggregation (design.md §8, §25).

Summary

NameKindDescription
apply_review_policy()functionDecide what a human still has to look at.
grade_letter()function
class_summary()functionSummary cards, distribution and common issues (design.md §8).
grade_distribution()function
common_issues()functionRank the deductions that affected the most students (design.md §8).
rubric_breakdown()functionMean score per rubric item — shows where the class as a whole struggled.
review_queue()functionUnresolved review items, worst first (design.md §14).

Constants

NameValueNotes
DEFAULT_CONFIDENCE_THRESHOLD0.8

Functions

apply_review_policy(result: SubmissionResult, confidence_threshold: float = DEFAULT_CONFIDENCE_THRESHOLD, review_below_full_marks: bool = True) -> SubmissionResult #[source]

Decide what a human still has to look at.

Flags are additive and explicit: a TA should be able to read why a submission reached the queue without opening the raw results.

With review_below_full_marks on (the default), every deduction goes to the queue: an automated deduction is a claim about a student's work, and a person signs off on it before it becomes a grade. Full marks need no defence, so a clean submission passes straight through.

grade_letter(percentage: float | None) -> str #[source]

No description.

class_summary(results: Iterable[SubmissionResult]) -> dict[str, Any] #[source]

Summary cards, distribution and common issues (design.md §8).

grade_distribution(percentages: list[float], bin_size: int = 10) -> list[dict[str, Any]] #[source]

No description.

common_issues(results: Iterable[SubmissionResult], limit: int = 10) -> list[dict[str, Any]] #[source]

Rank the deductions that affected the most students (design.md §8).

rubric_breakdown(results: Iterable[SubmissionResult]) -> list[dict[str, Any]] #[source]

Mean score per rubric item — shows where the class as a whole struggled.

review_queue(results: Iterable[SubmissionResult]) -> list[dict[str, Any]] #[source]

Unresolved review items, worst first (design.md §14).