Skip to content

Round (sub)task scores to correct precision when displaying#1398

Merged
prandla merged 1 commit into
cms-dev:mainfrom
e-i-o:score-rounding-2
Jul 3, 2025
Merged

Round (sub)task scores to correct precision when displaying#1398
prandla merged 1 commit into
cms-dev:mainfrom
e-i-o:score-rounding-2

Conversation

@prandla

@prandla prandla commented Jun 9, 2025

Copy link
Copy Markdown
Member
  • The headings of subtasks in the submission details view were hardcoded to a precision of 2 decimal places. Round them to the correct precision.
  • Send correctly rounded scores to RWS (instead of hardcoding 2 decimal places). RWS itself already handles score_precision correctly.
  • Compute task score from rounded subtask scores.

First two points are clearly bugs. The last point is a little more debatable; it would theoretically be possible to have higher precision for subtasks than for the whole task. But I feel like that could be confusing to contestants, and rarely useful.

@veluca93

veluca93 commented Jun 9, 2025

Copy link
Copy Markdown
Contributor

On the first two I agree.

The third however is problematic, as it may make it impossible to get 100 points -- for example if for whatever reason someone decided to make 9 subtasks each worth 11.(1) points.

IMO it should at the very least be in a different PR, and I am not sure we want it at all.

@veluca93
veluca93 deleted the branch cms-dev:main June 24, 2025 14:16
@veluca93 veluca93 closed this Jun 24, 2025
@veluca93 veluca93 reopened this Jun 24, 2025
@prandla
prandla force-pushed the score-rounding-2 branch from ad41d36 to 4367193 Compare June 30, 2025 22:19
@prandla

prandla commented Jun 30, 2025

Copy link
Copy Markdown
Member Author

Undid some of the rounding; now scores are still computed as precise floats as far as possible and only rounded for display. I'll make a new issue to discuss rounding of subtasks further.

@prandla

prandla commented Jun 30, 2025

Copy link
Copy Markdown
Member Author

actually, the scores in the ranking are still computed from rounded subtask scores (when using max over subtask scoring). fixing that requires more refactoring though; it's not a 2-line change.

@prandla prandla changed the title Always round (sub)task scores to the correct precision Round (sub)task scores to correct precision when displaying Jul 1, 2025
@prandla
prandla force-pushed the score-rounding-2 branch from 4367193 to d9737e3 Compare July 3, 2025 18:09
@prandla
prandla merged commit bb3baaa into cms-dev:main Jul 3, 2025
1 check passed
@prandla
prandla deleted the score-rounding-2 branch July 3, 2025 18:27
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.

2 participants