modelscaler

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModelScaler

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

func NewModelScaler

func NewModelScaler(client client.Client, namespace string) *ModelScaler

func (*ModelScaler) ListAllModels

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

func (*ModelScaler) ModelExists

func (s *ModelScaler) ModelExists(ctx context.Context, model string) (bool, error)

func (*ModelScaler) Scale

func (s *ModelScaler) 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 (*ModelScaler) ScaleAtLeastOneReplica

func (s *ModelScaler) 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