Skip to main content

RetryPolicyScenario

Economics scenarios · Implementation: mlsysim/engine/scenario_definitions/economics.py.

Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.

A cheap attempt retried up to a cap, run as a batch, or one stronger attempt.

Notes

Equation: The result property delegates to the named solver documented below; it converts declared scenario units before passing the inputs.

Assumptions: Attempt successes are independent with fixed probability and fixed per-attempt charges.

Excludes: Correlated failure causes, changing retry quality, and latency scheduling.

References

Derivation: the scenario composes mlsysim.solvers.RetryPolicyModel. Their contracts supply the underlying equations; property equations show the remaining unit conversions and accounting.

Examples

>>> from mlsysim import Scenarios
>>> scenario = Scenarios.CheapRetryAgainstStrongCall
>>> value = scenario.result
>>> type(value).__name__
'RetryPolicyResult'

Attributes

Name Description
attempt_cost
max_attempts
pass_probability
result Return the typed accounting result from RetryPolicyModel using this scenario’s
strong_attempt_cost
strong_pass_probability

pass_probability

Type: float.

Declared default: required.

attempt_cost

Type: Quantity.

Declared default: required.

max_attempts

Type: int.

Declared default: required.

strong_pass_probability

Type: float.

Declared default: required.

strong_attempt_cost

Type: Quantity.

Declared default: required.

result

engine.scenario_types.RetryPolicyScenario.result

Return the typed accounting result from RetryPolicyModel using this scenario’s declared inputs; units and exclusions follow that solver contract.

Equation: RetryPolicyModel().solve(pass_probability, attempt_cost, max_attempts, strong_pass_probability, strong_attempt_cost).

Back to top