Skip to content

vllm.model_executor.model_loader.weight_cache.artifact_store

Storage backends for daemon warmup-cache artifacts (disk and shared stores).

Classes:

  • ArtifactStore –

    One warmup-cache artifact store: bytes in and out, keyed by artifact_key.

  • DiskArtifactStore –

    The local disk store: one directory tree per warmup-cache kind.

  • MooncakeArtifactStore –

    MooncakeDistributedStore wrapper via MOONCAKE_CONFIG_PATH.

Functions:

  • artifact_key –

    Canonical key for one warmup-cache artifact, valid in every store.

  • atomic_write_bytes –

    Atomically write bytes to path via a unique temp file in its directory.

ArtifactStore

Bases: Protocol

One warmup-cache artifact store: bytes in and out, keyed by artifact_key.

Methods:

  • get –

    Fetch the artifact, or None on a miss.

  • put –

    Publish the artifact under the key.

get(key)

Fetch the artifact, or None on a miss.

put(key, data)

Publish the artifact under the key.

DiskArtifactStore

Bases: ArtifactStore

The local disk store: one directory tree per warmup-cache kind.

MooncakeArtifactStore

Bases: ArtifactStore

MooncakeDistributedStore wrapper via MOONCAKE_CONFIG_PATH.

Methods:

  • get –

    Fetch the artifact; a miss or a native error reads as empty.

  • put –

    Publish the artifact; first writer wins, so publishers are idempotent.

get(key)

Fetch the artifact; a miss or a native error reads as empty.

put(key, data)

Publish the artifact; first writer wins, so publishers are idempotent.

artifact_key(kind, config_hash, filename)

Canonical key for one warmup-cache artifact, valid in every store.

atomic_write_bytes(path, data, *, mtime_ns=None)

Atomically write bytes to path via a unique temp file in its directory.