load_artifact
def load_artifact(path: str | os.PathLike, *, verify: bool = True) -> dict
from compileml import load_artifact
Load an artifact from JSON, verifying hash and structure by default.
Parameters#
| Name | Type | Default | Kind |
|---|---|---|---|
| path | str | os.PathLike | required | positional |
| verify | bool | True | keyword-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