Skip to main content

IdleCapacityCostScenario

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.

gpus accelerators held idle for duration at device_hour_rate.

gang_gpus (optional) is the gang the held GPUs belong to, for a partial gang that waits for its missing members.

Notes

Equation: device-hours = devices * idle hours; charge = device-hours * hourly price.

Assumptions: All held devices incur the same constant price; gang shortfall requires a supplied gang size.

Excludes: Opportunity cost, energy, and changes in price during the reservation.

References

Derivation: device-hours = devices * idle hours; charge = device-hours * hourly price. 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.ReservedGpusIdleThreeWeeks
>>> round(float(case.gpu_hours), 3)
252000.0

Attributes

Name Description
cost Idle-capacity charge in USD, using the same hourly rate for every held device.
device_hour_rate
duration
gang_gpus
gpu_hours Held device-hours: multiply the accelerator count by the idle duration in hours.
gpus
missing_gpus Missing devices in the gang, as gang size minus held size; requires gang_gpus.

gpus

Type: int.

Declared default: required.

duration

Type: Quantity.

Declared default: required.

device_hour_rate

Type: Quantity.

Declared default: required.

gang_gpus

Type: Optional[int].

Declared default: None.

gpu_hours

engine.scenario_types.IdleCapacityCostScenario.gpu_hours

Held device-hours: multiply the accelerator count by the idle duration in hours.

Equation: return gpus * duration.to('hour').magnitude.

cost

engine.scenario_types.IdleCapacityCostScenario.cost

Idle-capacity charge in USD, using the same hourly rate for every held device.

Equation: return gpu_hours * _usd_per_hour(device_hour_rate).

missing_gpus

engine.scenario_types.IdleCapacityCostScenario.missing_gpus

Missing devices in the gang, as gang size minus held size; requires gang_gpus.

Equation: return gang_gpus - gpus.

Back to top