mlservice

package
v0.0.0-...-d0cda72 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MLServiceKind = "MLService"
)

Variables

This section is empty.

Functions

func GetDefaultWorkerGroupSpecConfig

func GetDefaultWorkerGroupSpecConfig(wgCfg mlv1.WorkerGroupSpec, image string, hfRef *mlv1.HFSecretRef) (rayv1.WorkerGroupSpec, error)

func GetHeadGroupSpecConfig

func GetHeadGroupSpecConfig(mlService *mlv1.MLService, modelTmpVersion *mlv1.ModelTemplateVersion, releaseName, image string) (*rayv1.HeadGroupSpec, error)

GetHeadGroupSpecConfig returns the head group spec of the rayCluster 1. GCS and persistent log is enabled by default for the head group 2. add model config mount point

func GetModelConfigMapKey

func GetModelConfigMapKey(modelTpmVersionName string) string

func GetModelVolume

func GetModelVolume(modelTmpVersion *mlv1.ModelTemplateVersion) corev1.Volume

func GetRayClusterSpecConfig

func GetRayClusterSpecConfig(mlSvc *mlv1.MLService, modelTmpVersion *mlv1.ModelTemplateVersion, releaseName string) (*rayv1.RayClusterSpec, error)

func Register

func Register(ctx context.Context, mgmt *config.Management) error

func SetRayClusterImage

func SetRayClusterImage(mlSvc *mlv1.MLService, service *rayv1.RayService)

func SetRayClusterWorkerGroupConfig

func SetRayClusterWorkerGroupConfig(mlSvc *mlv1.MLService, service *rayv1.RayService)

Types

type Handler

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

func (*Handler) OnChange

func (h *Handler) OnChange(_ string, mlService *mlv1.MLService) (*mlv1.MLService, error)

OnChange method will help to serve the LLM model inference 1. sync required resources like model config and secrets to the local NS 2. serve and reconcile the serving parameters using the RayService

func (*Handler) SyncClusterSecretsToLocalNS

func (h *Handler) SyncClusterSecretsToLocalNS(hfRef *mlv1.HFSecretRef, namespace string) error

type ServeApplication

type ServeApplication struct {
	Name        string    `yaml:"name,omitempty"`
	RoutePrefix string    `yaml:"route_prefix,omitempty"`
	ImportPath  string    `yaml:"import_path,omitempty"`
	Args        ServeArgs `yaml:"args,omitempty"`
}

type ServeArgs

type ServeArgs struct {
	Models []string `json:"models,omitempty"`
}

type ServeConfig

type ServeConfig struct {
	Applications []ServeApplication `yaml:"applications,omitempty"`
}

Jump to

Keyboard shortcuts

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