Skip to content
Snippets Groups Projects

Resolve "Score of order depends on remaining time"

Merged Fabian Heinrich requested to merge 128-score-of-order-depends-on-remaining-time into dev
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -120,10 +120,10 @@ def stepped_score(
@@ -120,10 +120,10 @@ def stepped_score(
raise ValueError("steps and vals must have the same length")
raise ValueError("steps and vals must have the same length")
for threshold, ratio in zip(reversed(steps), reversed(score_ratios)):
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))
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):
class ScoreViaHooks(HookCallbackClass):
Loading