xnn.common.models.registry.resolve_dispersion#
- xnn.common.models.registry.resolve_dispersion(explicit, recorded)[source]#
The dispersion a deployment adds to a checkpoint’s model.
recordedis the checkpoint’ssubtracted_dispersionrecord (what the labels had removed, with the settings to add it back);explicitis what the caller asked for. The rules:explicit=Falseserves the model as is; with no record the explicit request is used; with a record and no request the record is used; with both, the explicit keys override the recorded ones (so{"cutoff_triple": 8.0}keeps the recorded functional parameters), and a different term name is an error.- Returns:
The spec for
add_dispersion(), orNoneto add nothing.- Return type:
- Raises:
ValueError – When the explicit spec names another term than the record.