Skip to content

Add more warnings about score ranges (and reject_score) - #484

Merged
gkreitz merged 5 commits into
Kattis:masterfrom
gkreitz:439_compute_score_range
Sep 2, 2026
Merged

Add more warnings about score ranges (and reject_score)#484
gkreitz merged 5 commits into
Kattis:masterfrom
gkreitz:439_compute_score_range

Conversation

@gkreitz

@gkreitz gkreitz commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

In these new checks, we compute max scores for test data groups based on the configuration of their children, and add several new warnings:

  • If the range can be narrowed (e.g,. 10 points per test case, 7 test cases, but your range says 0 100)
  • If no range was specified, but we can compute one
  • If no range is specified on the root node (where you basically always want to specify something)
  • If the root node has a negative minimum (which is almost always a mistake)

I decided not to add warnings if the computed range is larger than the declared range (e.g., 11 test cases worth 10 each, but the range says 0 100). This should be caught by out-of-bounds checks when running submissions. Happy to take opinions on if we want to check it statically here too.

Note that these checks all disappear when a custom grader is used (for obvious reasons). And if custom scoring is used, we can't make any assumptions regarding what each test case is worth, so the checks are less likely to catch stuff.

I also added an explicit warning for using reject_score. It's been removed in the new format. I cannot think of a good use case, and it's always the default 0 in all of the problems ever installed on Kattis.

Fixes #439

@pehrsoderman pehrsoderman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two comments to review before merge.

Comment thread problemtools/checks/testdata.py
Comment thread problemtools/checks/testdata.py
Comment thread problemtools/checks/testdata.py
@gkreitz
gkreitz merged commit 46cae2a into Kattis:master Sep 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compute score bounds based on grading conf and warn about discrepancies

2 participants