Documentation ¶
Index ¶
- type AdapterConfiguration
- type ModelManagerConfig
- type OvmsAdapterServer
- func (s *OvmsAdapterServer) LoadModel(ctx context.Context, req *mmesh.LoadModelRequest) (*mmesh.LoadModelResponse, error)
- func (s *OvmsAdapterServer) RuntimeStatus(ctx context.Context, req *mmesh.RuntimeStatusRequest) (*mmesh.RuntimeStatusResponse, error)
- func (s *OvmsAdapterServer) UnloadModel(ctx context.Context, req *mmesh.UnloadModelRequest) (*mmesh.UnloadModelResponse, error)
- type OvmsConfigErrorResponse
- type OvmsConfigResponse
- type OvmsModelManager
- func (mm *OvmsModelManager) GetConfig(ctx context.Context) error
- func (mm *OvmsModelManager) LoadModel(ctx context.Context, modelPath string, modelId string) error
- func (mm *OvmsModelManager) UnloadAll(ctx context.Context) error
- func (mm *OvmsModelManager) UnloadModel(ctx context.Context, modelId string) error
- type OvmsModelStatus
- type OvmsModelStatusResponse
- type OvmsModelVersionStatus
- type OvmsMultiModelConfigListEntry
- type OvmsMultiModelModelConfig
- type OvmsMultiModelRepositoryConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdapterConfiguration ¶
type AdapterConfiguration struct { Port int OvmsPort int OvmsContainerMemReqBytes int OvmsMemBufferBytes int CapacityInBytes int MaxLoadingConcurrency int ModelLoadingTimeoutMS int DefaultModelSizeInBytes int ModelSizeMultiplier float64 RuntimeVersion string LimitModelConcurrency int // 0 means no limit (default) RootModelDir string UseEmbeddedPuller bool // OVMS adapter specific ModelConfigFile string BatchWaitTimeMin time.Duration BatchWaitTimeMax time.Duration ReloadTimeout time.Duration }
func GetAdapterConfigurationFromEnv ¶
func GetAdapterConfigurationFromEnv(log logr.Logger) (*AdapterConfiguration, error)
type ModelManagerConfig ¶
type OvmsAdapterServer ¶
type OvmsAdapterServer struct { ModelManager *OvmsModelManager Puller *puller.Puller AdapterConfig *AdapterConfiguration Log logr.Logger // embed generated Unimplemented type for forward-compatibility for gRPC mmesh.UnimplementedModelRuntimeServer }
func NewOvmsAdapterServer ¶
func NewOvmsAdapterServer(runtimePort int, config *AdapterConfiguration, log logr.Logger) *OvmsAdapterServer
func (*OvmsAdapterServer) LoadModel ¶
func (s *OvmsAdapterServer) LoadModel(ctx context.Context, req *mmesh.LoadModelRequest) (*mmesh.LoadModelResponse, error)
func (*OvmsAdapterServer) RuntimeStatus ¶
func (s *OvmsAdapterServer) RuntimeStatus(ctx context.Context, req *mmesh.RuntimeStatusRequest) (*mmesh.RuntimeStatusResponse, error)
func (*OvmsAdapterServer) UnloadModel ¶
func (s *OvmsAdapterServer) UnloadModel(ctx context.Context, req *mmesh.UnloadModelRequest) (*mmesh.UnloadModelResponse, error)
type OvmsConfigErrorResponse ¶
type OvmsConfigErrorResponse struct {
Error string `json:"error"`
}
type OvmsConfigResponse ¶
type OvmsConfigResponse map[string]OvmsModelStatusResponse
type OvmsModelManager ¶
type OvmsModelManager struct {
// contains filtered or unexported fields
}
The OVMS Model Manager follows the Actor pattern to own and manage models
The exposed functions are thread safe; they send messages to the Actor and wait for a response. The Manager runs a background event loop to process model updates in batches
func NewOvmsModelManager ¶
func NewOvmsModelManager(address string, multiModelConfigFilename string, log logr.Logger, mmConfig ModelManagerConfig) (*OvmsModelManager, error)
func (*OvmsModelManager) GetConfig ¶
func (mm *OvmsModelManager) GetConfig(ctx context.Context) error
func (*OvmsModelManager) UnloadAll ¶
func (mm *OvmsModelManager) UnloadAll(ctx context.Context) error
func (*OvmsModelManager) UnloadModel ¶
func (mm *OvmsModelManager) UnloadModel(ctx context.Context, modelId string) error
type OvmsModelStatus ¶
type OvmsModelStatusResponse ¶
type OvmsModelStatusResponse struct {
ModelVersionStatus []OvmsModelVersionStatus `json:"model_version_status"`
}
type OvmsModelVersionStatus ¶
type OvmsModelVersionStatus struct { Version string `json:"version"` State string `json:"state"` Status OvmsModelStatus `json:"status"` }
type OvmsMultiModelConfigListEntry ¶
type OvmsMultiModelConfigListEntry struct {
Config OvmsMultiModelModelConfig `json:"config"`
}
type OvmsMultiModelRepositoryConfig ¶
type OvmsMultiModelRepositoryConfig struct {
ModelConfigList []OvmsMultiModelConfigListEntry `json:"model_config_list"`
}
OvmsMultiModelRepositoryConfig Types defining the structure of the OVMS Multi-Model config file
Doc: https://github.com/openvinotoolkit/model_server/blob/main/docs/multiple_models_mode.md JSON Schema: https://github.com/openvinotoolkit/model_server/blob/eab97207fbe9078f83a3f85b468418555b02959a/src/schema.cpp#L28
EXAMPLE:
{ "model_config_list": [ { "config": { "name": "model_name1", "base_path": "/models/model1" } }, { "config": { "name": "model_name2", "base_path": "/models/model1" } } ] }
Click to show internal directories.
Click to hide internal directories.