DiurnalLendingScenario
Optimization scenarios · Implementation: mlsysim/engine/scenario_definitions/optimization.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
A fleet split between a serving reservation and a training base, static against lent.
The reservation is the forecast serving peak plus surge_buffer. Lending gives training whatever the reservation holds above average demand plus the buffer; the GPUs left after the reservation and the training base are maintenance headroom.
Notes
Equation: lent devices = serving reservation - average demand - surge buffer; dynamic active = static active + lent.
Assumptions: Demand and reservation counts describe one common fleet and the average lent capacity can be reclaimed.
Excludes: A time-series demand simulation, reclaim delay, and preemption losses.
References
Derivation: lent devices = serving reservation - average demand - surge buffer; dynamic active = static active + lent. 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.DiurnalServingLending1K
>>> round(float(case.peak_demand), 3)
283.0Attributes
| Name | Description |
|---|---|
| annual_value | Annual USD value of average lent device capacity at the fixed hourly price. |
| device_hour_rate | |
| dynamic_active | Active device-equivalents after adding the lent capacity to training. |
| dynamic_utilization | Active fraction of the fleet under the assumed lending policy. |
| fleet_gpus | |
| headroom | Devices outside both the serving reservation and the training base allocation. |
| lent | Average devices lent to training after keeping the surge buffer available. |
| peak_demand | Serving device demand before adding the reservation’s surge buffer. |
| serving_average | |
| serving_reclaimable | Reserved devices above average serving demand, before preserving the buffer. |
| serving_reservation | |
| static_active | Active device-equivalents under the fixed allocation: average serving plus base |
| static_utilization | Active fraction of the fleet with no lending. |
| surge_buffer | |
| training_base |
fleet_gpus
Type: int.
Declared default: required.
serving_reservation
Type: int.
Declared default: required.
serving_average
Type: int.
Declared default: required.
surge_buffer
Type: int.
Declared default: required.
training_base
Type: int.
Declared default: required.
device_hour_rate
Type: Quantity.
Declared default: required.
peak_demand
engine.scenario_types.DiurnalLendingScenario.peak_demand
Serving device demand before adding the reservation’s surge buffer.
Equation: return serving_reservation - surge_buffer.
serving_reclaimable
engine.scenario_types.DiurnalLendingScenario.serving_reclaimable
Reserved devices above average serving demand, before preserving the buffer.
Equation: return serving_reservation - serving_average.
lent
engine.scenario_types.DiurnalLendingScenario.lent
Average devices lent to training after keeping the surge buffer available.
Equation: return serving_reclaimable - surge_buffer.
headroom
engine.scenario_types.DiurnalLendingScenario.headroom
Devices outside both the serving reservation and the training base allocation.
Equation: return fleet_gpus - serving_reservation - training_base.
static_active
engine.scenario_types.DiurnalLendingScenario.static_active
Active device-equivalents under the fixed allocation: average serving plus base training.
Equation: return serving_average + training_base.
dynamic_active
engine.scenario_types.DiurnalLendingScenario.dynamic_active
Active device-equivalents after adding the lent capacity to training.
Equation: return static_active + lent.
static_utilization
engine.scenario_types.DiurnalLendingScenario.static_utilization
Active fraction of the fleet with no lending.
Equation: return static_active / fleet_gpus.
dynamic_utilization
engine.scenario_types.DiurnalLendingScenario.dynamic_utilization
Active fraction of the fleet under the assumed lending policy.
Equation: return dynamic_active / fleet_gpus.
annual_value
engine.scenario_types.DiurnalLendingScenario.annual_value
Annual USD value of average lent device capacity at the fixed hourly price.
Equation: return lent * _usd_per_hour(device_hour_rate) * HOURS_PER_YEAR.