An interface for the manager of a model store.

A model store is defined as a storage medium on which multiple models can be stored. Each stored model has a unique path as its identifier. A ModelStoreManager for the store allows actions including

  • Listing the models stored in the store.
  • Deleting a model from the store.
interface ModelStoreManager {
    listModels(): Promise<{
        [path: string]: ModelArtifactsInfo;
    }>;
    removeModel(path: string): Promise<ModelArtifactsInfo>;
}

Methods

  • List all models in the model store.

    Returns Promise<{
        [path: string]: ModelArtifactsInfo;
    }>

    A dictionary mapping paths of existing models to their model artifacts info. Model artifacts info include type of the model's topology, byte sizes of the topology, weights, etc.

  • Remove a model specified by path.

    Parameters

    • path: string

    Returns Promise<ModelArtifactsInfo>

    ModelArtifactsInfo of the deleted model (if and only if deletion is successful).

    Error if deletion fails, e.g., if no model exists at path.