compileml.runtime

verify_artifact

def verify_artifact(artifact: dict) -> bool

from compileml.runtime import verify_artifact

True iff the stored hash matches the recomputed canonical hash.

Parameters#

NameTypeDefaultKind
artifactdictrequiredpositional

Returns#

bool

Example#

python
from compileml.runtime import load_artifact, verify_artifact
 
artifact = load_artifact("decision.json", verify=False)
verify_artifact(artifact) # raises ArtifactError on mismatch