modelclient

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModelClient

type ModelClient struct {
	// contains filtered or unexported fields
}

func NewModelClient

func NewModelClient(client client.Client, namespace string) *ModelClient

func (*ModelClient) ListAllModels

func (s *ModelClient) ListAllModels(ctx context.Context) ([]kubeaiv1.Model, error)

func (*ModelClient) LookupModel

func (c *ModelClient) LookupModel(ctx context.Context, model, adapter string, labelSelectors []string) (*kubeaiv1.Model, error)

LookupModel checks if a model exists and matches the given label selectors.

func (*ModelClient) Scale

func (c *ModelClient) Scale(ctx context.Context, model *kubeaiv1.Model, replicas int32, requiredConsecutiveScaleDowns int) error

Scale scales the model to the desired number of replicas, enforcing the min and max replica bounds. Model should have .Spec defined before calling Scale().

func (*ModelClient) ScaleAtLeastOneReplica

func (c *ModelClient) ScaleAtLeastOneReplica(ctx context.Context, model string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL