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#
| Name | Type | Default | Kind |
|---|---|---|---|
| artifact | dict | required | positional |
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