aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/MLRsearch/multiple_loss_ratio_search.py
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2023-10-19 10:47:48 +0200
committerVratko Polak <vrpolak@cisco.com>2023-10-19 09:38:33 +0000
commit7a27faf661cf54a84ef4ee0984e12879a223ce32 (patch)
tree07b33102eaea074c74a53264934c3fbfdfd4b96d /resources/libraries/python/MLRsearch/multiple_loss_ratio_search.py
parent351c5e1e92f31465e1a4523d3fe9b7701457a503 (diff)
feat(MLRseach): Update to v8 conditional throughput
Hopefully, with CSIT config values, PDR lower than NDR will not happen. + Bump duration_sum default to an odd number, so users are not surprised by not seeing standard median behavior. For CSIT this should not matter, overheads hide ties and number of trials (at least for STL) should stay the same. Change-Id: Id7130f978c31e71227499612424007c473bcfac2 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/python/MLRsearch/multiple_loss_ratio_search.py')
-rw-r--r--resources/libraries/python/MLRsearch/multiple_loss_ratio_search.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/resources/libraries/python/MLRsearch/multiple_loss_ratio_search.py b/resources/libraries/python/MLRsearch/multiple_loss_ratio_search.py
index b48e2e7547..9f7be4fcd1 100644
--- a/resources/libraries/python/MLRsearch/multiple_loss_ratio_search.py
+++ b/resources/libraries/python/MLRsearch/multiple_loss_ratio_search.py
@@ -38,7 +38,10 @@ from .trimmed_stat import TrimmedStat
@dataclass
class MultipleLossRatioSearch:
- """Optimized binary search algorithm for finding conditional throughputs.
+ """Implementation of the controller part of MLRsearch algorithm.
+
+ The manager part is creating and calling this,
+ the measurer part is injected.
Traditional binary search algorithm needs initial interval
(lower and upper bound), and returns final narrow bounds
@@ -88,6 +91,14 @@ class MultipleLossRatioSearch:
There are also subtle optimizations related to candidate selection
and uneven splitting of intervals, too numerous to list here.
+
+ The return values describe performance at the relevant lower bound
+ as "conditional throughput", which is based on loss ratio of one of trials
+ selected as a quantile based on exceed ratio parameter.
+ Usually this value may be quite pessimistic, as MLRsearch stops
+ measuring a load as soon as it becomes a lower bound,
+ so conditional throughput is usually based on forwarding rate
+ of the worst on the good long trials.
"""
config: Config
@@ -123,11 +134,11 @@ class MultipleLossRatioSearch:
:param measurer: Measurement provider to use by this search object.
:param debug: Callable to optionally use instead of logging.debug().
- :returns: Structure containing conditional throughputs and other stats,
- one for each search goal.
:type measurer: AbstractMeasurer
:type debug: Optional[Callable[[str], None]]
- :returns: Mapping from goal to lower bound (none if min load is hit).
+ :returns: Structure containing conditional throughputs and other stats,
+ one for each search goal. If a value is None it means there is
+ no lower bound (min load turned out to be an upper bound).
:rtype: Pep3140Dict[SearchGoal, Optional[TrimmedStat]]
:raises RuntimeError: If total duration is larger than timeout,
or if min load becomes an upper bound for a search goal