ModelRegistryBase<T, TInput, TOutput>
Base Classes · AiDotNet.ModelRegistry
Base class for model registry implementations.
Implements: IModelRegistry<T, TInput, TOutput>
Known derived types: ModelRegistry<T, TInput, TOutput>
How It Works
For Beginners: This abstract base class provides common functionality for model registry systems. It handles storage path management, versioning logic, and stage transitions while leaving specific storage implementation to derived classes.
Key features:
- Path security validation
- Model versioning support
- Stage transition management (Development, Staging, Production, Archived)
- Thread-safe model tracking
Methods
| Method | Summary |
|---|---|
List<ModelVersionInfo<T>> ListModelVersions(string modelName) |
Lists all versions of a specific model. |
List<RegisteredModel<T, TInput, TOutput>> SearchModels(ModelSearchCriteria<T> searchCriteria) |
Searches for models based on criteria. |
List<string> ListModels(string filter, Dictionary<string, string> tags) |
Lists all models in the registry. |
ModelCard GenerateModelCard(string modelName, int version, string developers) |
Generates a Model Card from the registered model’s metadata and evaluation results. |
ModelCard GetModelCard(string modelName, int version) |
Gets the Model Card for a registered model version. |
ModelComparison<T> CompareModels(string modelName, int version1, int version2) |
Compares two model versions. |
ModelLineage GetModelLineage(string modelName, int version) |
Gets the lineage information for a model. |
RegisteredModel<T, TInput, TOutput> GetLatestModel(string modelName) |
Gets the latest version of a model. |
RegisteredModel<T, TInput, TOutput> GetModel(string modelName, int? version) |
Retrieves a specific model version from the registry. |
RegisteredModel<T, TInput, TOutput> GetModelByStage(string modelName, ModelStage stage) |
Gets the model currently in a specific stage. |
int CreateModelVersion(string modelName, IModel<TInput, TOutput, TMetadata> model, ModelMetadata<T> metadata, string description) |
Creates a new version of an existing model. |
string GetModelStoragePath(string modelName, int version) |
Gets the storage location for a model version. |
string RegisterModel(string name, IModel<TInput, TOutput, TMetadata> model, ModelMetadata<T> metadata, Dictionary<string, string> tags) |
Registers a new model in the registry. |
void ArchiveModel(string modelName, int version) |
Archives a model version. |
void AttachModelCard(string modelName, int version, ModelCard modelCard) |
Attaches a Model Card to a registered model version. |
void DeleteModel(string modelName) |
Deletes all versions of a model. |
void DeleteModelVersion(string modelName, int version) |
Deletes a specific model version. |
void SaveModelCard(string modelName, int version, string filePath) |
Saves the Model Card for a model version to a file. |
void TransitionModelStage(string modelName, int version, ModelStage targetStage, bool archivePrevious) |
Transitions a model version to a different stage. |
void UpdateModelMetadata(string modelName, int version, ModelMetadata<T> metadata) |
Updates the metadata for a model version. |
void UpdateModelTags(string modelName, int version, Dictionary<string, string> tags) |
Adds or updates tags for a model. |