IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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)

source

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

source

The artifact format version. Recorded but not yet checked.

export_time​

export_time: str

source

The ISO-8601 UTC time of the export.

files​

files: Mapping[str, str]

source

Maps file names to their hex sha256 checksums.

from_dict()​

classmethod from_dict(value)

source

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:

ArtifactMetadata

host_machine​

host_machine: str

source

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

source

The OS of the exporting host, from platform.system().

max_version​

max_version: str

source

The MAX version that exported the artifact.

model_sources​

model_sources: Sequence[HuggingFaceRef]

source

Every Hugging Face reference used by the artifact’s components.

to_dict()​

to_dict()

source

Returns the JSON form of the metadata.

Return type:

dict[str, JsonValue]