DataCostBreakdownScenario
Data scenarios · Implementation: mlsysim/engine/scenario_definitions/data.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
A supervised dataset’s bill: acquisition, labels at label_price, storage_bytes kept for storage_duration at storage_rate, and runs training runs of run_time each on accelerators at accelerator_rate.
Notes
Equation: label_cost is the worked quantity; each property below states its equation and units.
Assumptions: Unit prices, storage occupancy, and run durations remain constant throughout the campaign.
Excludes: Discounts, idle capacity, finance charges, and overlapping costs not listed in the scenario.
References
Derivation: The equations below follow the stated counts, geometric relations, or accounting definitions; scenario inputs are supplied assumptions or observations, not fitted predictions.
Examples
Execute the registered worked inputs; this is a modeled calculation.
>>> from mlsysim import Scenarios
>>> case = Scenarios.ImageNetDataCostBreakdown
>>> value = case.label_cost
>>> print(f"{value:.3f~P}")
64058.350 dollarAttributes
| Name | Description |
|---|---|
| accelerator_hours | Accelerator-hours consumed by the full run campaign. |
| accelerator_hours_per_run | Accelerator-hours consumed by one run, device count times duration. |
| accelerator_rate | |
| accelerators | |
| acquisition | |
| compute_cost | Campaign compute cost in USD at the supplied accelerator-hour price. |
| compute_share | Dimensionless quantity for the compute share of total cost. |
| data_share | Dimensionless quantity for the data-related share of total cost. |
| label_cost | Label-acquisition cost, label count times unit label price. |
| label_price | |
| labels | |
| run_time | |
| runs | |
| storage_bytes | |
| storage_cost | Storage cost in USD, stored bytes times duration times unit storage price. |
| storage_duration | |
| storage_rate | |
| total | Total acquisition, labeling, storage, and compute cost. |
acquisition
Type: Quantity.
Declared default: required.
labels
Type: Quantity.
Declared default: required.
label_price
Type: Quantity.
Declared default: required.
storage_bytes
Type: Quantity.
Declared default: required.
storage_rate
Type: Quantity.
Declared default: required.
storage_duration
Type: Quantity.
Declared default: required.
run_time
Type: Quantity.
Declared default: required.
runs
Type: int.
Declared default: required.
accelerators
Type: int.
Declared default: required.
accelerator_rate
Type: Quantity.
Declared default: required.
label_cost
engine.scenario_types.DataCostBreakdownScenario.label_cost
Label-acquisition cost, label count times unit label price.
Equation: return self.labels * self.label_price
storage_cost
engine.scenario_types.DataCostBreakdownScenario.storage_cost
Storage cost in USD, stored bytes times duration times unit storage price.
Equation: return (self.storage_bytes * self.storage_rate * self.storage_duration).to(‘USD’)
accelerator_hours_per_run
engine.scenario_types.DataCostBreakdownScenario.accelerator_hours_per_run
Accelerator-hours consumed by one run, device count times duration.
Equation: return self.accelerators * self.run_time
accelerator_hours
engine.scenario_types.DataCostBreakdownScenario.accelerator_hours
Accelerator-hours consumed by the full run campaign.
Equation: return self.accelerator_hours_per_run * self.runs
compute_cost
engine.scenario_types.DataCostBreakdownScenario.compute_cost
Campaign compute cost in USD at the supplied accelerator-hour price.
Equation: return (self.accelerator_hours * self.accelerator_rate).to(‘USD’)
total
engine.scenario_types.DataCostBreakdownScenario.total
Total acquisition, labeling, storage, and compute cost.
Equation: return self.acquisition + self.label_cost + self.storage_cost + self.compute_cost