Skip to content

Commit

Permalink
hopefully fixed ert_fes/ert_time_millis upper bound error
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasWeise committed Jun 4, 2022
1 parent c9b1c27 commit 4eb0b03
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions moptipy/evaluation/end_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os.path
import sys
from dataclasses import dataclass
from math import inf
from math import inf, ceil
from typing import Optional, Union, Iterable, List, Dict, Final, Callable, Any

import moptipy.api.logging as log
Expand Down Expand Up @@ -364,7 +364,7 @@ def __init__(self,
raise ValueError(
"ert_fes must be >= "
f"{success_fes.minimum}, but is {ert_fes}.")
ert_fe_max = total_fes.mean_arith * n
ert_fe_max = ceil(total_fes.mean_arith * n)
if ert_fes > ert_fe_max:
raise ValueError(
"ert_fes must be <= "
Expand All @@ -376,10 +376,10 @@ def __init__(self,
"ert_time_millis must be >= "
f"{success_time_millis.minimum}, but "
f"is {ert_time_millis}.")
ert_time_max = total_time_millis.mean_arith * n
ert_time_max = ceil(total_time_millis.mean_arith * n)
if ert_time_millis > ert_time_max:
raise ValueError(
"ert_fes must be <= "
"ert_time_millis must be <= "
f"{ert_time_max}, but is {ert_time_millis}.")
else:
if success_fes is not None:
Expand Down

0 comments on commit 4eb0b03

Please sign in to comment.