diff options
author | Vratko Polak <vrpolak@cisco.com> | 2023-10-24 15:44:53 +0200 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2023-10-25 10:21:05 +0000 |
commit | 8993ddb4f38f2754ae3af1c61e69a2e747f32a67 (patch) | |
tree | bb8759980251c44f1a395197e9fe506d1fa77ef7 /resources/libraries/python/MLRsearch/trimmed_stat.py | |
parent | ee28e8ae476c6b0c098cd3895c586316feb4bdb9 (diff) |
feat(MLRsearch): use goal result as in draft05
No effect on NDRPDR results, just different result packaging
between the MLRsearch library and the rest of CSIT.
- PyPI metadata still to be updated in a separate Change.
Change-Id: I547134da189d1d7761594e92f36cc7c1c232ee32
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/python/MLRsearch/trimmed_stat.py')
-rw-r--r-- | resources/libraries/python/MLRsearch/trimmed_stat.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/resources/libraries/python/MLRsearch/trimmed_stat.py b/resources/libraries/python/MLRsearch/trimmed_stat.py index 088e8beaf8..74918d78b0 100644 --- a/resources/libraries/python/MLRsearch/trimmed_stat.py +++ b/resources/libraries/python/MLRsearch/trimmed_stat.py @@ -16,9 +16,7 @@ from __future__ import annotations from dataclasses import dataclass -from typing import Optional -from .discrete_load import DiscreteLoad from .load_stats import LoadStats from .target_spec import TargetSpec @@ -52,26 +50,3 @@ class TrimmedStat(LoadStats): int_load=stats.int_load, target_to_stat={target: stats.target_to_stat[target]}, ) - - @property - def conditional_throughput(self) -> Optional[DiscreteLoad]: - """Compute conditional throughput from the load. - - The conditional throughput has the same semantics as load, - so if load is unicirectional and user wants bidirectional - throughput, the manager has to compensate. - - This only works correctly if the self load is a lower bound - for the self target, but this method does not check that. - Its should not matter, as MLRsearch controller only returns - the relevant lower bounds to the manager. - - :return: Conditional throughput assuming self is a relevant lower bound. - :rtype: Optional[DiscreteLoad] - :raises RuntimeError: If target is unclear or load is spurious. - """ - target = list(self.target_to_stat.keys())[0] - stat = self.target_to_stat[target] - loss_ratio = stat.pessimistic_loss_ratio() - ret = self * (1.0 - loss_ratio) - return ret |