Skip to main content

DualBankUpdateScenario

Reliability scenarios · Implementation: mlsysim/engine/scenario_definitions/reliability.py.

Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.

An over-the-air update that keeps a second flash bank: two copies of model at bytes_per_param in the flash of device.

Notes

Equation: Required flash is twice the selected model-byte footprint; utilization divides this by registered flash capacity.

Assumptions: Two full model banks coexist during an update and the device exposes flash capacity.

Excludes: Firmware, filesystem, bootloader, rollback metadata, and flash alignment reserves.

References

Derivation: Required flash is twice the selected model-byte footprint; utilization divides this by registered flash capacity. This is declared scenario accounting rather than a fitted empirical law.

Examples

>>> from mlsysim import Scenarios
>>> scenario = Scenarios.KeywordSpotterDualBankEsp32S3
>>> value = scenario.bank_bytes
>>> str(value.units)
'B'

Attributes

Name Description
bank_bytes Model bytes in one update bank at the selected parameter precision.
banks_bytes Storage for two simultaneous model banks, in bytes.
bytes_per_param
device
flash Registered device flash capacity, with no inferred reserve.
flash_share Two-bank footprint divided by registered flash capacity, dimensionless.
model

model

Type: Any.

Declared default: required.

device

Type: HardwareNode.

Declared default: required.

bytes_per_param

Type: Quantity.

Declared default: required.

bank_bytes

engine.scenario_types.DualBankUpdateScenario.bank_bytes

Model bytes in one update bank at the selected parameter precision.

Equation: model.size_in_bytes(bytes_per_param).

banks_bytes

engine.scenario_types.DualBankUpdateScenario.banks_bytes

Storage for two simultaneous model banks, in bytes.

Equation: 2 * bank_bytes.

flash

engine.scenario_types.DualBankUpdateScenario.flash

Registered device flash capacity, with no inferred reserve.

Equation: device.memory.flash_capacity.

flash_share

engine.scenario_types.DualBankUpdateScenario.flash_share

Two-bank footprint divided by registered flash capacity, dimensionless.

Equation: (banks_bytes / flash).to('').magnitude.

Back to top