serving

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 36 Imported by: 1

Documentation

Index

Constants

View Source
const (
	GPU_RESOURCE_NAME        = "nvidia.com/gpu"
	ALIYUN_GPU_RESOURCE_NAME = "aliyun.com/gpu"
	GPU_MEM_RESOURCE_NAME    = "aliyun.com/gpu-mem"
	GPU_CORE_RESOURCE_NAME   = "aliyun.com/gpu-core.percentage"
)
View Source
const (
	ResourceGPU       v1.ResourceName = "nvidia.com/gpu"
	ResourceGPUMemory v1.ResourceName = "aliyun.com/gpu-mem"
	ResourceGPUCore   v1.ResourceName = "aliyun.com/gpu-core.percentage"
)

Variables

This section is empty.

Functions

func AcceptJobLog

func AcceptJobLog(name, version string, jobType types.ServingJobType, args *types.LogArgs) error

func CheckJobIsOwnedByProcesser added in v0.8.7

func CheckJobIsOwnedByProcesser(labels map[string]string) bool

func DeleteServingJob

func DeleteServingJob(namespace, name, version string, jobType types.ServingJobType) error

func DisplayAllServingJobs

func DisplayAllServingJobs(jobs []ServingJob, allNamespace bool, format types.FormatStyle)

func GetAllProcesser

func GetAllProcesser() map[types.ServingJobType]Processer

func PrintLine

func PrintLine(w io.Writer, fields ...string)

func PrintServingJob

func PrintServingJob(job ServingJob, mv *types.ModelVersion, format types.FormatStyle)

func RunTrafficRouterSplit

func RunTrafficRouterSplit(namespace string, args *types.TrafficRouterSplitArgs) (err error)

func SubmitCustomServingJob

func SubmitCustomServingJob(namespace string, args *types.CustomServingArgs) (err error)

func SubmitDistributedServingJob added in v0.12.0

func SubmitDistributedServingJob(namespace string, args *types.DistributedServingArgs) (err error)

func SubmitKFServingJob

func SubmitKFServingJob(namespace string, args *types.KFServingArgs) (err error)

func SubmitKServeJob added in v0.9.11

func SubmitKServeJob(namespace string, args *types.KServeArgs) (err error)

func SubmitSeldonServingJob added in v0.8.0

func SubmitSeldonServingJob(namespace string, args *types.SeldonServingArgs) (err error)

func SubmitTensorRTServingJob

func SubmitTensorRTServingJob(namespace string, args *types.TensorRTServingArgs) (err error)

func SubmitTensorflowServingJob

func SubmitTensorflowServingJob(namespace string, args *types.TensorFlowServingArgs) (err error)

func SubmitTritonServingJob added in v0.8.5

func SubmitTritonServingJob(namespace string, args *types.TritonServingArgs) (err error)

func UpdateCustomServing added in v0.8.9

func UpdateCustomServing(args *types.UpdateCustomServingArgs) error

func UpdateDistributedServing added in v0.12.0

func UpdateDistributedServing(args *types.UpdateDistributedServingArgs) error

func UpdateKServe added in v0.9.11

func UpdateKServe(args *types.UpdateKServeArgs) error

func UpdateTensorflowServing added in v0.8.9

func UpdateTensorflowServing(args *types.UpdateTensorFlowServingArgs) error

func UpdateTritonServing added in v0.8.9

func UpdateTritonServing(args *types.UpdateTritonServingArgs) error

func ValidateJobsBeforeSubmiting added in v0.8.7

func ValidateJobsBeforeSubmiting(jobs []ServingJob, name string) error

Types

type CustomServingProcesser

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

CustomServingProcesser use the default processer

func (CustomServingProcesser) FilterServingJobs

func (p CustomServingProcesser) FilterServingJobs(namespace string, allNamespace bool, label string) ([]ServingJob, error)

func (CustomServingProcesser) GetServingJobs

func (p CustomServingProcesser) GetServingJobs(namespace, name, version string) ([]ServingJob, error)

func (CustomServingProcesser) IsDeploymentPod

func (p CustomServingProcesser) IsDeploymentPod(deployment *appv1.Deployment, pod *v1.Pod) bool

func (CustomServingProcesser) IsEnabled

func (p CustomServingProcesser) IsEnabled() bool

func (CustomServingProcesser) IsKnownDeployment

func (p CustomServingProcesser) IsKnownDeployment(namespace, name, version string, deployment *appv1.Deployment) bool

func (CustomServingProcesser) IsKnownService

func (p CustomServingProcesser) IsKnownService(namespace, name, version string, service *v1.Service) bool

func (CustomServingProcesser) IsSupported

func (p CustomServingProcesser) IsSupported(namespace, name, version string) bool

func (CustomServingProcesser) ListServingJobs

func (p CustomServingProcesser) ListServingJobs(namespace string, allNamespace bool) ([]ServingJob, error)

func (CustomServingProcesser) Type

func (p CustomServingProcesser) Type() types.ServingJobType

type DistributedServingProcesser added in v0.12.0

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

func (*DistributedServingProcesser) FilterServingJobs added in v0.12.0

func (p *DistributedServingProcesser) FilterServingJobs(namespace string, allNamespace bool, label string) ([]ServingJob, error)

func (*DistributedServingProcesser) GetServingJobs added in v0.12.0

func (p *DistributedServingProcesser) GetServingJobs(namespace, name, version string) ([]ServingJob, error)

func (DistributedServingProcesser) IsDeploymentPod added in v0.12.0

func (p DistributedServingProcesser) IsDeploymentPod(deployment *appv1.Deployment, pod *v1.Pod) bool

func (DistributedServingProcesser) IsEnabled added in v0.12.0

func (p DistributedServingProcesser) IsEnabled() bool

func (DistributedServingProcesser) IsKnownDeployment added in v0.12.0

func (p DistributedServingProcesser) IsKnownDeployment(namespace, name, version string, deployment *appv1.Deployment) bool

func (DistributedServingProcesser) IsKnownService added in v0.12.0

func (p DistributedServingProcesser) IsKnownService(namespace, name, version string, service *v1.Service) bool

func (DistributedServingProcesser) IsSupported added in v0.12.0

func (p DistributedServingProcesser) IsSupported(namespace, name, version string) bool

func (*DistributedServingProcesser) ListServingJobs added in v0.12.0

func (p *DistributedServingProcesser) ListServingJobs(namespace string, allNamespace bool) ([]ServingJob, error)

func (DistributedServingProcesser) Type added in v0.12.0

func (p DistributedServingProcesser) Type() types.ServingJobType

type KFServingProcesser

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

TensorflowServingProcesser use the default processer

func (KFServingProcesser) FilterServingJobs

func (p KFServingProcesser) FilterServingJobs(namespace string, allNamespace bool, label string) ([]ServingJob, error)

func (KFServingProcesser) GetServingJobs

func (p KFServingProcesser) GetServingJobs(namespace, name, version string) ([]ServingJob, error)

func (KFServingProcesser) IsDeploymentPod

func (p KFServingProcesser) IsDeploymentPod(deployment *appv1.Deployment, pod *v1.Pod) bool

func (KFServingProcesser) IsEnabled

func (p KFServingProcesser) IsEnabled() bool

func (KFServingProcesser) IsKnownDeployment

func (p KFServingProcesser) IsKnownDeployment(namespace, name, version string, deployment *appv1.Deployment) bool

func (KFServingProcesser) IsKnownService

func (p KFServingProcesser) IsKnownService(namespace, name, version string, service *v1.Service) bool

func (KFServingProcesser) IsSupported

func (p KFServingProcesser) IsSupported(namespace, name, version string) bool

func (KFServingProcesser) ListServingJobs

func (p KFServingProcesser) ListServingJobs(namespace string, allNamespace bool) ([]ServingJob, error)

func (KFServingProcesser) Type

func (p KFServingProcesser) Type() types.ServingJobType

type KServeProcesser added in v0.9.11

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

KServeProcesser use the default processer

func (*KServeProcesser) FilterServingJobs added in v0.9.11

func (p *KServeProcesser) FilterServingJobs(namespace string, allNamespace bool, label string) ([]ServingJob, error)

func (*KServeProcesser) GetServingJobs added in v0.9.11

func (p *KServeProcesser) GetServingJobs(namespace, name, version string) ([]ServingJob, error)

func (KServeProcesser) IsDeploymentPod added in v0.9.11

func (p KServeProcesser) IsDeploymentPod(deployment *appv1.Deployment, pod *v1.Pod) bool

func (KServeProcesser) IsEnabled added in v0.9.11

func (p KServeProcesser) IsEnabled() bool

func (KServeProcesser) IsKnownDeployment added in v0.9.11

func (p KServeProcesser) IsKnownDeployment(namespace, name, version string, deployment *appv1.Deployment) bool

func (KServeProcesser) IsKnownService added in v0.9.11

func (p KServeProcesser) IsKnownService(namespace, name, version string, service *v1.Service) bool

func (KServeProcesser) IsSupported added in v0.9.11

func (p KServeProcesser) IsSupported(namespace, name, version string) bool

func (*KServeProcesser) ListServingJobs added in v0.9.11

func (p *KServeProcesser) ListServingJobs(namespace string, allNamespace bool) ([]ServingJob, error)

func (KServeProcesser) Type added in v0.9.11

func (p KServeProcesser) Type() types.ServingJobType

type Processer

type Processer interface {
	// Type returns the processer type
	Type() types.ServingJobType
	// IsSupported is used to check the processer support the serving job or not
	IsSupported(namespace, name, version string) bool
	// IsEnabled returns the processer is enabled or not
	IsEnabled() bool
	// ListServingJobs is used to list serving jobs
	ListServingJobs(namespace string, allNamespace bool) ([]ServingJob, error)
	// GetServingJob is used to get serving job
	GetServingJobs(namespace, name, version string) ([]ServingJob, error)
	// FilterServingJobs is used to filter serving jobs
	FilterServingJobs(namespace string, allNamespace bool, filter string) ([]ServingJob, error)
}

Processer is used to process serving jobs

func NewCustomServingProcesser

func NewCustomServingProcesser() Processer

func NewDistributedServingProcesser added in v0.12.0

func NewDistributedServingProcesser() Processer

func NewKFServingProcesser

func NewKFServingProcesser() Processer

func NewKServeProcesser added in v0.9.11

func NewKServeProcesser() Processer

func NewSeldonServingProcesser added in v0.8.0

func NewSeldonServingProcesser() Processer

func NewTensorflowServingProcesser

func NewTensorflowServingProcesser() Processer

func NewTensorrtServingProcesser

func NewTensorrtServingProcesser() Processer

func NewTritonServingProcesser added in v0.8.5

func NewTritonServingProcesser() Processer

type SeldonServingProcesser added in v0.8.0

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

SeldonServingProcesser use the default processer

func (*SeldonServingProcesser) FilterServingJobs added in v0.8.0

func (p *SeldonServingProcesser) FilterServingJobs(namespace string, allNamespace bool, label string) ([]ServingJob, error)

func (*SeldonServingProcesser) GetServingJobs added in v0.8.0

func (p *SeldonServingProcesser) GetServingJobs(namespace, name, version string) ([]ServingJob, error)

func (SeldonServingProcesser) IsDeploymentPod added in v0.8.0

func (p SeldonServingProcesser) IsDeploymentPod(deployment *appv1.Deployment, pod *v1.Pod) bool

func (SeldonServingProcesser) IsEnabled added in v0.8.0

func (p SeldonServingProcesser) IsEnabled() bool

func (SeldonServingProcesser) IsKnownDeployment added in v0.8.0

func (p SeldonServingProcesser) IsKnownDeployment(namespace, name, version string, deployment *appv1.Deployment) bool

func (SeldonServingProcesser) IsKnownService added in v0.8.0

func (p SeldonServingProcesser) IsKnownService(namespace, name, version string, service *v1.Service) bool

func (SeldonServingProcesser) IsSupported added in v0.8.0

func (p SeldonServingProcesser) IsSupported(namespace, name, version string) bool

func (*SeldonServingProcesser) ListServingJobs added in v0.8.0

func (p *SeldonServingProcesser) ListServingJobs(namespace string, allNamespace bool) ([]ServingJob, error)

func (SeldonServingProcesser) Type added in v0.8.0

func (p SeldonServingProcesser) Type() types.ServingJobType

type ServingJob

type ServingJob interface {
	// GetName returns the job name
	Name() string
	// GetNamespace returns the namespace
	Namespace() string
	// Uid returns the uid
	Uid() string
	// Type returns the type
	Type() types.ServingJobType
	// Version returns the job version
	Version() string
	// Pods returns the job pods
	Pods() []*v1.Pod
	// Deployment returns the deployment
	Deployment() *appv1.Deployment
	// Service returns the job services
	Services() []*v1.Service
	// Age returns the job age
	Age() time.Duration
	// Get start time
	StartTime() *metav1.Time
	// Endpoints return the endpoints
	Endpoints() []types.Endpoint
	// IPAddress return the inference address
	IPAddress() string
	// RequestCPUs returns the cpus which serving job owned
	RequestCPUs() float64
	// RequestGPUs returns the gpus which serving job owned
	RequestGPUs() float64
	// RequestGPUMemory returns the gpu memory,only for gpushare
	RequestGPUMemory() int
	// RequestGPUCore returns the gpu core, only for cgpu
	RequestGPUCore() int
	// DesiredInstances return the desired instances count
	DesiredInstances() int
	// AvailableInstances returns the available instances
	AvailableInstances() int
	// Convert2JobInfo convert to ServingJobInfo
	Convert2JobInfo() types.ServingJobInfo
	// GetLabels returns the labels
	GetLabels() map[string]string
}

ServingJob defines a serving job

func ListServingJobs

func ListServingJobs(namespace string, allNamespace bool, servingType types.ServingJobType) ([]ServingJob, error)

func SearchServingJob

func SearchServingJob(namespace, name, version string, servingType types.ServingJobType) (ServingJob, error)

type ServingJobGroup added in v0.8.6

type ServingJobGroup struct {
	Id        string
	Namespace string
	JobType   types.ServingJobType
	JobName   string
}

type TensorflowServingProcesser

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

TensorflowServingProcesser use the default processer

func (TensorflowServingProcesser) FilterServingJobs

func (p TensorflowServingProcesser) FilterServingJobs(namespace string, allNamespace bool, label string) ([]ServingJob, error)

func (TensorflowServingProcesser) GetServingJobs

func (p TensorflowServingProcesser) GetServingJobs(namespace, name, version string) ([]ServingJob, error)

func (TensorflowServingProcesser) IsDeploymentPod

func (p TensorflowServingProcesser) IsDeploymentPod(deployment *appv1.Deployment, pod *v1.Pod) bool

func (TensorflowServingProcesser) IsEnabled

func (p TensorflowServingProcesser) IsEnabled() bool

func (TensorflowServingProcesser) IsKnownDeployment

func (p TensorflowServingProcesser) IsKnownDeployment(namespace, name, version string, deployment *appv1.Deployment) bool

func (TensorflowServingProcesser) IsKnownService

func (p TensorflowServingProcesser) IsKnownService(namespace, name, version string, service *v1.Service) bool

func (TensorflowServingProcesser) IsSupported

func (p TensorflowServingProcesser) IsSupported(namespace, name, version string) bool

func (TensorflowServingProcesser) ListServingJobs

func (p TensorflowServingProcesser) ListServingJobs(namespace string, allNamespace bool) ([]ServingJob, error)

func (TensorflowServingProcesser) Type

func (p TensorflowServingProcesser) Type() types.ServingJobType

type TensorrtServingProcesser

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

TensorrtServingProcesser use the default processer

func (TensorrtServingProcesser) FilterServingJobs

func (p TensorrtServingProcesser) FilterServingJobs(namespace string, allNamespace bool, label string) ([]ServingJob, error)

func (TensorrtServingProcesser) GetServingJobs

func (p TensorrtServingProcesser) GetServingJobs(namespace, name, version string) ([]ServingJob, error)

func (TensorrtServingProcesser) IsDeploymentPod

func (p TensorrtServingProcesser) IsDeploymentPod(deployment *appv1.Deployment, pod *v1.Pod) bool

func (TensorrtServingProcesser) IsEnabled

func (p TensorrtServingProcesser) IsEnabled() bool

func (TensorrtServingProcesser) IsKnownDeployment

func (p TensorrtServingProcesser) IsKnownDeployment(namespace, name, version string, deployment *appv1.Deployment) bool

func (TensorrtServingProcesser) IsKnownService

func (p TensorrtServingProcesser) IsKnownService(namespace, name, version string, service *v1.Service) bool

func (TensorrtServingProcesser) IsSupported

func (p TensorrtServingProcesser) IsSupported(namespace, name, version string) bool

func (TensorrtServingProcesser) ListServingJobs

func (p TensorrtServingProcesser) ListServingJobs(namespace string, allNamespace bool) ([]ServingJob, error)

func (TensorrtServingProcesser) Type

func (p TensorrtServingProcesser) Type() types.ServingJobType

type TritonServingProcesser added in v0.8.5

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

TritonServingProcesser use the default processer

func (TritonServingProcesser) FilterServingJobs added in v0.8.5

func (p TritonServingProcesser) FilterServingJobs(namespace string, allNamespace bool, label string) ([]ServingJob, error)

func (TritonServingProcesser) GetServingJobs added in v0.8.5

func (p TritonServingProcesser) GetServingJobs(namespace, name, version string) ([]ServingJob, error)

func (TritonServingProcesser) IsDeploymentPod added in v0.8.5

func (p TritonServingProcesser) IsDeploymentPod(deployment *appv1.Deployment, pod *v1.Pod) bool

func (TritonServingProcesser) IsEnabled added in v0.8.5

func (p TritonServingProcesser) IsEnabled() bool

func (TritonServingProcesser) IsKnownDeployment added in v0.8.5

func (p TritonServingProcesser) IsKnownDeployment(namespace, name, version string, deployment *appv1.Deployment) bool

func (TritonServingProcesser) IsKnownService added in v0.8.5

func (p TritonServingProcesser) IsKnownService(namespace, name, version string, service *v1.Service) bool

func (TritonServingProcesser) IsSupported added in v0.8.5

func (p TritonServingProcesser) IsSupported(namespace, name, version string) bool

func (TritonServingProcesser) ListServingJobs added in v0.8.5

func (p TritonServingProcesser) ListServingJobs(namespace string, allNamespace bool) ([]ServingJob, error)

func (TritonServingProcesser) Type added in v0.8.5

func (p TritonServingProcesser) Type() types.ServingJobType

Jump to

Keyboard shortcuts

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