cms icon indicating copy to clipboard operation
cms copied to clipboard

Always round (sub)task scores to the correct precision

Open prandla opened this issue 6 months ago • 1 comments

  • 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.

prandla avatar Jun 09 '25 00:06 prandla

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 avatar Jun 09 '25 06:06 veluca93

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 avatar Jun 30 '25 22:06 prandla

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 avatar Jun 30 '25 22:06 prandla