Registry
ModelRegistry
¶
Registry for managing model definitions across different platforms.
This class provides a centralized mechanism to register, retrieve, and load models for various logical model names and their corresponding platform-specific implementations. Models are stored in a dictionary keyed first by logical name and then by platform name, enabling flexible access and organization. Models are loaded from YAML files located within a dedicated package data directory.
The registry supports registration of models with custom platform parameters, retrieval of registered models by logical and platform name, and bulk loading of models from external configuration files.
getModelByName(logical_name, platform_name)
classmethod
¶
Retrieves the provider-specific string for a logical model name.
register(logical_name, platform_name, model)
classmethod
¶
register a model class and its platform-specific params. Usage: ModelRegistry.register("llama3", "ollama", ollama_model())