save_artifact
def save_artifact(artifact: dict, path: str | os.PathLike, *, indent: int | None = 2) -> None
from compileml.artifact import save_artifact
Write an artifact to JSON (hash already embedded; loaders verify it).
Parameters#
| Name | Type | Default | Kind |
|---|---|---|---|
| artifact | dict | required | positional |
| path | str | os.PathLike | required | positional |
| indent | int | None | 2 | keyword-only |
Returns#
None
Example#
python
from compileml.artifact import save_artifact save_artifact(artifact, "decision.json")