Documentation ¶
Index ¶
- func ModelDir() string
- func PreferredModelFormat(runtime string, supportedFormats []mv1.ModelFormat) (mv1.ModelFormat, error)
- type Client
- func NewOllamaClient(k8sClient client.Client, namespace string, rconfig *config.RuntimeConfig, ...) Client
- func NewTritonClient(k8sClient client.Client, namespace string, rconfig *config.RuntimeConfig, ...) Client
- func NewVLLMClient(k8sClient client.Client, namespace string, rconfig *config.RuntimeConfig, ...) Client
- type ClientFactory
- type Manager
- func (m *Manager) GetLLMAddress(modelID string) (string, error)
- func (m *Manager) ListInProgressModels() []string
- func (m *Manager) ListSyncedModelIDs(ctx context.Context) []string
- func (m *Manager) PullModel(ctx context.Context, modelID string) error
- func (m *Manager) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (m *Manager) SetupWithManager(mgr ctrl.Manager) error
- type Preloader
- type ScalerRegisterer
- type Updater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PreferredModelFormat ¶
func PreferredModelFormat(runtime string, supportedFormats []mv1.ModelFormat) (mv1.ModelFormat, error)
PreferredModelFormat returns the preferred model format.
Types ¶
type Client ¶
type Client interface { GetAddress(name string) string DeployRuntime(ctx context.Context, modelID string, update bool) (*appsv1.StatefulSet, error) }
Client is the interface for managing runtimes.
func NewOllamaClient ¶
func NewOllamaClient( k8sClient client.Client, namespace string, rconfig *config.RuntimeConfig, mconfig *config.ProcessedModelConfig, oconfig config.OllamaConfig, modelClient modelGetter, ) Client
NewOllamaClient creates a new Ollama runtime client.a
func NewTritonClient ¶ added in v0.378.0
func NewTritonClient( k8sClient client.Client, namespace string, rconfig *config.RuntimeConfig, mconfig *config.ProcessedModelConfig, ) Client
NewTritonClient creates a new Triton runtime client.
func NewVLLMClient ¶
func NewVLLMClient( k8sClient client.Client, namespace string, rconfig *config.RuntimeConfig, mconfig *config.ProcessedModelConfig, modelClient modelClient, ) Client
NewVLLMClient creates a new VLLM runtime client.
type ClientFactory ¶
ClientFactory is the interface for creating a new Client given a model ID.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages runtimes.
func NewManager ¶
func NewManager( k8sClient client.Client, rtClientFactory ClientFactory, autoscaler ScalerRegisterer, ) *Manager
NewManager creates a new runtime manager.
func (*Manager) GetLLMAddress ¶
GetLLMAddress returns the address of the LLM.
func (*Manager) ListInProgressModels ¶
ListInProgressModels returns the list of models that are in progress.
func (*Manager) ListSyncedModelIDs ¶
ListSyncedModelIDs returns the list of models that are synced.
type Preloader ¶
type Preloader struct {
// contains filtered or unexported fields
}
Preloader preloads models.
func NewPreloader ¶
NewPreloader creates a new Preloader.
func (*Preloader) NeedLeaderElection ¶
NeedLeaderElection implements LeaderElectionRunnable and always returns true.
func (*Preloader) SetupWithManager ¶
SetupWithManager sets up the multi-autoscaler with the Manager.
type ScalerRegisterer ¶
type ScalerRegisterer interface { Register(modelID string, target types.NamespacedName) Unregister(target types.NamespacedName) }
ScalerRegisterer is an interface for registering and unregistering scalers.
type Updater ¶
type Updater struct {
// contains filtered or unexported fields
}
Updater updates runtimes at startup.
func NewUpdater ¶
func NewUpdater(namespace string, rtClientFactory ClientFactory) *Updater
NewUpdater creates a new Updater.
func (*Updater) NeedLeaderElection ¶
NeedLeaderElection implements LeaderElectionRunnable and always returns true.
func (*Updater) SetupWithManager ¶
SetupWithManager sets up the updater with the manager.