API Reference
compileml.runtime — primitives
The integer primitives a conforming runtime must reproduce. Pair each with its normative section of the artifact spec when porting to another language.
import compileml.runtime
Constants
| ARTIFACT_TYPE | 'compileml.decision_artifact' |
| SCHEMA_VERSION | 2 |
| PD_SCALE | 1000000 |
| LEAF | -2 |
score_micro()Raw ensemble score in micro units (may fall outside [0, micro_scale]).latent_from_raw()Clamp a raw score and convert to display scale (spec §4).band_index()Index of the band containing ``latent_int``.band_label()(index, label) for the band containing ``latent_int``.calibrate_ppm()Calibrated probability of default in ppm for a clamped latent.contributions_half_micro()Per-feature contributions in half-micro units.display_impacts()Display-scale impacts that sum exactly to the display-scale target (§7.5).format_reasons()Adverse and favorable reason blocks (§7.6).canonical_hash()SHA-256 hex digest of the canonical serialization (spec §9).validate_structure()Cheap structural checks; raises ArtifactError on violation.