compileml.runtime

load_artifact

def load_artifact(path: str | os.PathLike, *, verify: bool = True) -> dict

from compileml.runtime import load_artifact

Load an artifact from JSON, verifying hash and structure by default.

Parameters#

NameTypeDefaultKind
pathstr | os.PathLikerequiredpositional
verifyboolTruekeyword-only

Returns#

dict

Raises#

Read from the function body and the private helpers it calls, not inferred. A function that raises nothing has no section here.

Example#

python
from compileml.runtime import load_artifact
 
artifact = load_artifact("decision.json") # verifies the hash by default