Member Junction
    Preparing search index...

    Artifact-storage seam (plan §11). The serialized model artifact is persisted out-of-row and referenced by file id on the MJ: ML Models row (ArtifactFileID). The production implementation writes a MJ: Files record; tests use an in-memory map.

    interface IArtifactStore {
        AssertWritable(): Promise<void>;
        delete(fileId: string): Promise<void>;
        save(bytes: Uint8Array, name: string): Promise<string>;
    }

    Implemented by

    Index

    Methods

    • Refuse when this store cannot write here (for a storage provider: no provider by the configured name, its driver is not configured on this server, or a probe object cannot be written under the store's key prefix). The training engine calls it before anything of a run is written and before the trainer runs, so a run never spends its compute and then fails to store its artifacts.

      Returns Promise<void>

      Error naming what is missing

    • Remove an artifact this store saved: its file record and its bytes. Used to roll back the artifacts of a run that failed after storing them, so none is left unreferenced.

      Parameters

      • fileId: string

        the id save returned

      Returns Promise<void>

      Error when the artifact cannot be removed

    • Persist the serialized artifact bytes under a name and return the storage file id to record on the model. The store writes as the user it was built for.

      Parameters

      • bytes: Uint8Array

        the serialized model artifact

      • name: string

        a human-readable artifact name (e.g. model-<pipeline>-v<version>.bin)

      Returns Promise<string>

      the file id to store in MLModel.ArtifactFileID