model

package
v0.0.0-...-db4604a Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HpaModelCreate

func HpaModelCreate(modelName string, trainScript string, inferScript string) error

func HpaModelDelete

func HpaModelDelete(modelName string) error

func HpaModelGetID

func HpaModelGetID(modelName string) (uint, error)

func HpaModelRecordError

func HpaModelRecordError(modelName string, errorInfo string) error

func HpaModelRecordOk

func HpaModelRecordOk(modelName string) error

func HpaServiceChangeModel

func HpaServiceChangeModel(serviceName string, modelId uint) error

func HpaServiceCreate

func HpaServiceCreate(serviceName string, tags map[string]string, modelId uint) error

func HpaServiceDelete

func HpaServiceDelete(serviceName string) error

func HpaServiceRecordError

func HpaServiceRecordError(serviceName string, errorInfo string) error

func HpaServiceRecordThreshQPS

func HpaServiceRecordThreshQPS(serviceName string, threshQPS uint) error

func InitModel

func InitModel()

Types

type HpaModel

type HpaModel struct {
	gorm.Model
	ModelName   string `gorm:"column:model_name"`
	Status      string `gorm:"column:status"`
	TrainScript string `gorm:"column:train_script"`
	InferScript string `gorm:"column:infer_script"`
	ErrorInfo   string `gorm:"column:error_info"`
}

func HpaModelGet

func HpaModelGet(modelName string) (*HpaModel, error)

func HpaModelList

func HpaModelList() ([]HpaModel, error)

func (HpaModel) TableName

func (HpaModel) TableName() string

type HpaService

type HpaService struct {
	gorm.Model
	ServiceName string   `gorm:"column:service_name;uniqueIndex"`
	Tags        string   `gorm:"column:tags;index"`
	Status      string   `gorm:"column:status"`
	ThreshQPS   uint     `gorm:"column:thresh_qps"`
	ModelId     uint     `gorm:"column:model_id"`
	ErrorInfo   string   `gorm:"column:error_info"`
	HpaModel    HpaModel `gorm:"foreignKey:ModelId"`
}

func HpaServiceGet

func HpaServiceGet(serviceName string) (*HpaService, error)

func HpaServiceList

func HpaServiceList() ([]HpaService, error)

func (HpaService) TableName

func (HpaService) TableName() string

Jump to

Keyboard shortcuts

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