Skip to content
Snippets Groups Projects
Commit a523030e authored by Fabian Heinrich's avatar Fabian Heinrich
Browse files

Fixed negative time ratio in score calc

parent 7f121dd0
No related branches found
No related tags found
1 merge request!94Resolve "Score of order depends on remaining time"
......@@ -120,10 +120,10 @@ def stepped_score(
raise ValueError("steps and vals must have the same length")
for threshold, ratio in zip(reversed(steps), reversed(score_ratios)):
if time_percentage >= threshold:
if max(time_percentage, 0) >= threshold:
return float(np.round(max_score * ratio, decimals=round_decimals))
assert False, "Should not reach here."
assert False, "This should not happen."
class ScoreViaHooks(HookCallbackClass):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment