For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python class
ArtifactMetadata
ArtifactMetadata
class max.pipelines.lib.artifact.ArtifactMetadata(artifact_version, model_sources, max_version, export_time, host_system, host_machine, files)
Bases: object
Where an artifact came from and the checksums of its files.
The MAX version is recorded for provenance and error messages only. Artifacts are only guaranteed to load on the build that exported them.
-
Parameters:
artifact_version
artifact_version: int
The artifact format version. Recorded but not yet checked.
export_time
export_time: str
The ISO-8601 UTC time of the export.
files
Maps file names to their hex sha256 checksums.
from_dict()
classmethod from_dict(value)
Parses the JSON form written by to_dict().
-
Parameters:
-
value (JsonValue) – The parsed contents of
metadata.json. -
Returns:
-
The metadata.
-
Raises:
-
ArtifactError – If a field is missing or has the wrong type.
-
Return type:
host_machine
host_machine: str
The CPU architecture of the exporting host, from platform.machine().
This can differ from the target the compiled model runs on.
host_system
host_system: str
The OS of the exporting host, from platform.system().
max_version
max_version: str
The MAX version that exported the artifact.
model_sources
model_sources: Sequence[HuggingFaceRef]
Every Hugging Face reference used by the artifact’s components.
to_dict()
to_dict()
Returns the JSON form of the metadata.