SpotEffectiveCostScenario
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.
Spot capacity priced per hour of retained progress.
Each interruption bills checkpoint_overhead + restart_overhead that retain no progress, once per retained_interval of progress, so the effective price is the spot price times billed time over retained time.
Notes
Equation: effective price = spot price * (retained time + checkpoint time + restart time) / retained time.
Assumptions: The same interruption overhead accompanies every positive retained- progress interval.
Excludes: Interruption distributions, unavailable replacement capacity, and nonlinear recovery work.
References
Derivation: effective price = spot price * (retained time + checkpoint time + restart time) / retained time. The individual properties state units and intermediate accounting; this class introduces no fitted coefficient.
Examples
The named scenario supplies illustrative inputs; the output is calculated.
>>> from mlsysim import Scenarios
>>> case = Scenarios.SpotInterruptionEffectiveCost
>>> round(float(case.nominal_discount), 3)
0.65Attributes
| Name | Description |
|---|---|
| billed_over_retained | Billed time per unit of useful progress, a dimensionless multiplier; retained time |
| checkpoint_overhead | |
| effective_cost_ratio | Effective spot price divided by on-demand price, a dimensionless cost ratio. |
| effective_rate | USD per device-hour of retained progress, including the interruption time |
| effective_savings | Fraction of on-demand cost saved after overhead; negative values mean spot costs |
| lost_per_interruption | Minutes billed for checkpoint and restart without retaining additional progress. |
| nominal_discount | Fractional price reduction before interruption overhead, relative to on-demand |
| on_demand_rate | |
| restart_overhead | |
| retained_interval | |
| spot_rate |
on_demand_rate
Type: Quantity.
Declared default: required.
spot_rate
Type: Quantity.
Declared default: required.
checkpoint_overhead
Type: Quantity.
Declared default: required.
restart_overhead
Type: Quantity.
Declared default: required.
retained_interval
Type: Quantity.
Declared default: required.
nominal_discount
engine.scenario_types.SpotEffectiveCostScenario.nominal_discount
Fractional price reduction before interruption overhead, relative to on-demand price.
Equation: return 1 - _usd_per_hour(spot_rate) / _usd_per_hour(on_demand_rate).
lost_per_interruption
engine.scenario_types.SpotEffectiveCostScenario.lost_per_interruption
Minutes billed for checkpoint and restart without retaining additional progress.
Equation: return (checkpoint_overhead + restart_overhead).to('minute').
billed_over_retained
engine.scenario_types.SpotEffectiveCostScenario.billed_over_retained
Billed time per unit of useful progress, a dimensionless multiplier; retained time must be positive.
Equation: interval = retained_interval.to('minute').magnitude; return (interval + lost_per_interruption.magnitude) / interval.
effective_rate
engine.scenario_types.SpotEffectiveCostScenario.effective_rate
USD per device-hour of retained progress, including the interruption time multiplier.
Equation: return _usd_per_hour(spot_rate) * billed_over_retained.
effective_cost_ratio
engine.scenario_types.SpotEffectiveCostScenario.effective_cost_ratio
Effective spot price divided by on-demand price, a dimensionless cost ratio.
Equation: return effective_rate / _usd_per_hour(on_demand_rate).
effective_savings
engine.scenario_types.SpotEffectiveCostScenario.effective_savings
Fraction of on-demand cost saved after overhead; negative values mean spot costs more.
Equation: return 1 - effective_cost_ratio.