Skip to main content

InformationComputeRatioScenario

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.

Accuracy gained per training FLOP for one epoch over all of dataset and over a keep_fraction subset, with gain_full and gain_subset points of gain.

Notes

Equation: icr_ratio is the worked quantity; each property below states its equation and units.

Assumptions: Accuracy gains are supplied percentage-point observations and work scales with retained sample count.

Excludes: Predicting accuracy gains, convergence, or the subset-selection computation.

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.ResNet50HalfImageNetIcr
>>> value = case.icr_ratio
>>> round(value, 3)
1.8

Attributes

Name Description
dataset
epoch_flops FLOPs for one full training epoch.
examples Dataset training-example count as a scalar.
gain_full
gain_subset
icr_full Supplied full-data accuracy gain in percentage points per training FLOP.
icr_ratio Dimensionless subset-to-full information/compute ratio.
icr_subset Supplied subset accuracy gain in percentage points per training FLOP.
keep_fraction
subset_examples Expected retained-example count, with no integer rounding.
subset_flops FLOPs for one epoch over the retained subset.
training_flops_factor
training_flops_per_sample Assumed training work per sample in GFLOP, forward work times training factor.
workload

workload

Type: Workload.

Declared default: required.

dataset

Type: Any.

Declared default: required.

gain_full

Type: float.

Declared default: required.

gain_subset

Type: float.

Declared default: required.

keep_fraction

Type: float.

Declared default: required.

training_flops_factor

Type: float.

Declared default: 3.0.

examples

engine.scenario_types.InformationComputeRatioScenario.examples

Dataset training-example count as a scalar.

Equation: return self.dataset.training_examples.to(‘count’).magnitude

training_flops_per_sample

engine.scenario_types.InformationComputeRatioScenario.training_flops_per_sample

Assumed training work per sample in GFLOP, forward work times training factor.

Equation: return (self.workload.inference_flops * self.training_flops_factor).to(‘GFLOP’)

epoch_flops

engine.scenario_types.InformationComputeRatioScenario.epoch_flops

FLOPs for one full training epoch.

Equation: return (self.examples * self.training_flops_per_sample).to(‘flop’)

subset_examples

engine.scenario_types.InformationComputeRatioScenario.subset_examples

Expected retained-example count, with no integer rounding.

Equation: return self.examples * self.keep_fraction

subset_flops

engine.scenario_types.InformationComputeRatioScenario.subset_flops

FLOPs for one epoch over the retained subset.

Equation: return (self.subset_examples * self.training_flops_per_sample).to(‘flop’)

icr_full

engine.scenario_types.InformationComputeRatioScenario.icr_full

Supplied full-data accuracy gain in percentage points per training FLOP.

Equation: return self.gain_full / self.epoch_flops.magnitude

icr_subset

engine.scenario_types.InformationComputeRatioScenario.icr_subset

Supplied subset accuracy gain in percentage points per training FLOP.

Equation: return self.gain_subset / self.subset_flops.magnitude

icr_ratio

engine.scenario_types.InformationComputeRatioScenario.icr_ratio

Dimensionless subset-to-full information/compute ratio.

Equation: return self.icr_subset / self.icr_full

Back to top