Skip to main content

ModelCascadeScenario

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 tiered cascade over a completed cohort, every exit under one gate, against the top tier alone.

Notes

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

Assumptions: Tier exits use one acceptance gate and supplied cohort counts; each reached tier incurs its call and gate work.

Excludes: Predicting acceptance counts or harm probability from the model architecture.

References

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

Examples

>>> from mlsysim import Scenarios
>>> scenario = Scenarios.CodeEditThreeTierCascade
>>> value = scenario.result
>>> type(value).__name__
'ModelCascadeResult'

Attributes

Name Description
accepted_by_tier
call_costs
call_times
direct_accepted
false_accept_rate
gate_cost
gate_time
harm_per_false_accept
result Return the typed accounting result from ModelCascadeModel using this scenario’s
tasks

tasks

Type: int.

Declared default: required.

call_costs

Type: List[Quantity].

Declared default: required.

gate_cost

Type: Quantity.

Declared default: required.

call_times

Type: List[Quantity].

Declared default: required.

gate_time

Type: Quantity.

Declared default: required.

accepted_by_tier

Type: List[int].

Declared default: required.

direct_accepted

Type: int.

Declared default: required.

false_accept_rate

Type: Optional[float].

Declared default: None.

harm_per_false_accept

Type: Optional[Quantity].

Declared default: None.

result

engine.scenario_types.ModelCascadeScenario.result

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

Equation: ModelCascadeModel().solve(tasks, [float(c.to('USD').magnitude) for c in call_costs], float(gate_cost.to('USD').magnitude), [float(t.to('second').magnitude) for t in call_times], float(gate_time.to('second').magnitude), accepted_by_tier, direct_accepted, false_accept_rate, harm).

Back to top