RuntimeGoodputScenario
Serving scenarios · Implementation: mlsysim/engine/scenario_definitions/serving.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
Runtime goodput of a job on failures.n_devices devices over a held window.
failures is the job’s series failure model (SeriesFailureScenario); the checkpoint is workload at bytes_per_param; recovery is the four-term budget profile (Systems.Reliability.Recovery).
Notes
Equation: runtime result = RuntimeGoodputModel.solve(fleet MTBF, checkpoint bytes, recovery profile, waits, and preemption inputs).
Assumptions: Checkpoint bytes use the supplied per-parameter convention. Device-count sweeps hold all other inputs fixed. Crossover search needs a positive step and a reachable crossing.
Excludes: Searching arbitrary layouts, convergence changes, and a termination guarantee when no crossover exists.
References
Derivation: This configuration forwards its stored inputs to mlsysim.solvers.RuntimeGoodputModel.solve. The solver contract records the equations and their provenance.
Examples
The named scenario supplies illustrative inputs; the output is calculated.
>>> from mlsysim import Scenarios
>>> case = Scenarios.Llama2_70BRuntimeGoodput128
>>> round(float(case.checkpoint_bytes.to('B').magnitude), 3)
980000000000.0Attributes
| Name | Description |
|---|---|
| bytes_per_param | |
| checkpoint_bytes | Checkpoint bytes from physics.quantities.memory_from_params under the declared |
| failures | |
| input_wait | |
| lost_work | |
| preemption_rate | |
| recovery | |
| result | Modeled result from mlsysim.solvers.RuntimeGoodputModel.solve using this |
| window | |
| workload |
Methods
| Name | Description |
|---|---|
| at | Copy the scenario for a new device count while preserving all other job and |
| crossover | First device count, in positive step increments, where failure-side waste |
| sweep | Map each requested device count to its RuntimeGoodputModel.solve result. |
at
engine.scenario_types.RuntimeGoodputScenario.at(n_devices)Copy the scenario for a new device count while preserving all other job and recovery inputs.
Equation: return variant(failures=failures.variant(n_devices=n_devices)).
crossover
engine.scenario_types.RuntimeGoodputScenario.crossover(step)First device count, in positive step increments, where failure-side waste exceeds input waits.
Equation: Follow the crossover calculation below; branch conditions and rounding are part of its definition.
sweep
engine.scenario_types.RuntimeGoodputScenario.sweep(sizes)Map each requested device count to its RuntimeGoodputModel.solve result.
Equation: return {n: at(n).result for n in sizes}.
failures
Type: Any.
Declared default: required.
workload
Type: Workload.
Declared default: required.
bytes_per_param
Type: Quantity.
Declared default: required.
recovery
Type: Any.
Declared default: required.
input_wait
Type: float.
Declared default: required.
window
Type: Quantity.
Declared default: required.
lost_work
Type: Quantity.
Declared default: required.
preemption_rate
Type: Quantity.
Declared default: required.
checkpoint_bytes
engine.scenario_types.RuntimeGoodputScenario.checkpoint_bytes
Checkpoint bytes from physics.quantities.memory_from_params under the declared storage convention.
Equation: return memory_from_params(workload.parameters, bytes_per_param).to('byte').
result
engine.scenario_types.RuntimeGoodputScenario.result
Modeled result from mlsysim.solvers.RuntimeGoodputModel.solve using this scenario’s declared inputs; see that method for units, limits, and feasibility.
Equation: Delegates the declared fields to mlsysim.solvers.RuntimeGoodputModel.solve; returned quantities and feasibility follow that contract.