Skip to content

Round score at subtask level#1690

Merged
veluca93 merged 1 commit intocms-dev:mainfrom
akmohtashami:subtask_rounding
May 1, 2026
Merged

Round score at subtask level#1690
veluca93 merged 1 commit intocms-dev:mainfrom
akmohtashami:subtask_rounding

Conversation

@akmohtashami
Copy link
Copy Markdown
Contributor

This change updates scoring to match the updated IOI rule: each subtask score is rounded to the task’s score_precision, and the final task score is computed as the sum of those rounded subtask scores (with a final rounding pass to avoid float artifacts).

It also allows us to avoid passing unrounded score around. I am keeping some rounding in ranking in case of float issues.

@akmohtashami
Copy link
Copy Markdown
Contributor Author

FYI, @veluca93

@codecov
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

❌ Patch coverage is 81.81818% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.16%. Comparing base (c682a55) to head (2589b1b).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
cms/server/contest/handlers/tasksubmission.py 0.00% 4 Missing ⚠️
...nit_tests/grading/scoretypes/GroupThresholdTest.py 75.00% 3 Missing ⚠️
...uite/unit_tests/grading/scoretypes/GroupMinTest.py 90.00% 2 Missing ⚠️
...uite/unit_tests/grading/scoretypes/GroupMulTest.py 90.00% 2 Missing ⚠️
cms/grading/scoretypes/__init__.py 0.00% 1 Missing ⚠️
cms/grading/scoretypes/abc.py 90.00% 1 Missing ⚠️
cms/server/admin/handlers/contestranking.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1690      +/-   ##
==========================================
- Coverage   54.17%   54.16%   -0.02%     
==========================================
  Files         340      340              
  Lines       27844    27835       -9     
==========================================
- Hits        15085    15077       -8     
+ Misses      12759    12758       -1     
Flag Coverage Δ
functionaltests 0.00% <0.00%> (ø)
unittests 54.16% <81.81%> (-0.02%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@veluca93 veluca93 merged commit e0e4f8b into cms-dev:main May 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants