Documentation ¶
Index ¶
- Constants
- func AcceptJobLog(name, version string, jobType types.ServingJobType, args *types.LogArgs) error
- func DeleteServingJob(namespace, name, version string, jobType types.ServingJobType) error
- func DisplayAllServingJobs(jobs []ServingJob, allNamespace bool, format types.FormatStyle)
- func GetAllProcesser() map[types.ServingJobType]Processer
- func PrintLine(w io.Writer, fields ...string)
- func PrintServingJob(job ServingJob, format types.FormatStyle)
- func RunTrafficRouterSplit(namespace string, args *types.TrafficRouterSplitArgs) (err error)
- func SubmitCustomServingJob(namespace string, args *types.CustomServingArgs) (err error)
- func SubmitKFServingJob(namespace string, args *types.KFServingArgs) (err error)
- func SubmitTensorRTServingJob(namespace string, args *types.TensorRTServingArgs) (err error)
- func SubmitTensorflowServingJob(namespace string, args *types.TensorFlowServingArgs) (err error)
- type CustomServingProcesser
- func (p CustomServingProcesser) FilterServingJobs(namespace string, allNamespace bool, labels map[string]string) ([]ServingJob, error)
- func (p CustomServingProcesser) GetServingJobs(namespace, name, version string) ([]ServingJob, error)
- func (p CustomServingProcesser) IsDeploymentPod(deployment *appv1.Deployment, pod *v1.Pod) bool
- func (p CustomServingProcesser) IsEnabled() bool
- func (p CustomServingProcesser) IsKnownDeployment(namespace, name, version string, deployment *appv1.Deployment) bool
- func (p CustomServingProcesser) IsKnownService(namespace, name, version string, service *v1.Service) bool
- func (p CustomServingProcesser) IsSupported(namespace, name, version string) bool
- func (p CustomServingProcesser) ListServingJobs(namespace string, allNamespace bool) ([]ServingJob, error)
- func (p CustomServingProcesser) Type() types.ServingJobType
- type KFServingProcesser
- func (p KFServingProcesser) FilterServingJobs(namespace string, allNamespace bool, labels map[string]string) ([]ServingJob, error)
- func (p KFServingProcesser) GetServingJobs(namespace, name, version string) ([]ServingJob, error)
- func (p KFServingProcesser) IsDeploymentPod(deployment *appv1.Deployment, pod *v1.Pod) bool
- func (p KFServingProcesser) IsEnabled() bool
- func (p KFServingProcesser) IsKnownDeployment(namespace, name, version string, deployment *appv1.Deployment) bool
- func (p KFServingProcesser) IsKnownService(namespace, name, version string, service *v1.Service) bool
- func (p KFServingProcesser) IsSupported(namespace, name, version string) bool
- func (p KFServingProcesser) ListServingJobs(namespace string, allNamespace bool) ([]ServingJob, error)
- func (p KFServingProcesser) Type() types.ServingJobType
- type Processer
- type ServingJob
- type TensorflowServingProcesser
- func (p TensorflowServingProcesser) FilterServingJobs(namespace string, allNamespace bool, labels map[string]string) ([]ServingJob, error)
- func (p TensorflowServingProcesser) GetServingJobs(namespace, name, version string) ([]ServingJob, error)
- func (p TensorflowServingProcesser) IsDeploymentPod(deployment *appv1.Deployment, pod *v1.Pod) bool
- func (p TensorflowServingProcesser) IsEnabled() bool
- func (p TensorflowServingProcesser) IsKnownDeployment(namespace, name, version string, deployment *appv1.Deployment) bool
- func (p TensorflowServingProcesser) IsKnownService(namespace, name, version string, service *v1.Service) bool
- func (p TensorflowServingProcesser) IsSupported(namespace, name, version string) bool
- func (p TensorflowServingProcesser) ListServingJobs(namespace string, allNamespace bool) ([]ServingJob, error)
- func (p TensorflowServingProcesser) Type() types.ServingJobType
- type TensorrtServingProcesser
- func (p TensorrtServingProcesser) FilterServingJobs(namespace string, allNamespace bool, labels map[string]string) ([]ServingJob, error)
- func (p TensorrtServingProcesser) GetServingJobs(namespace, name, version string) ([]ServingJob, error)
- func (p TensorrtServingProcesser) IsDeploymentPod(deployment *appv1.Deployment, pod *v1.Pod) bool
- func (p TensorrtServingProcesser) IsEnabled() bool
- func (p TensorrtServingProcesser) IsKnownDeployment(namespace, name, version string, deployment *appv1.Deployment) bool
- func (p TensorrtServingProcesser) IsKnownService(namespace, name, version string, service *v1.Service) bool
- func (p TensorrtServingProcesser) IsSupported(namespace, name, version string) bool
- func (p TensorrtServingProcesser) ListServingJobs(namespace string, allNamespace bool) ([]ServingJob, error)
- func (p TensorrtServingProcesser) Type() types.ServingJobType
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" )
Variables ¶
This section is empty.
Functions ¶
func AcceptJobLog ¶
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 PrintServingJob ¶
func PrintServingJob(job ServingJob, 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 SubmitKFServingJob ¶
func SubmitKFServingJob(namespace string, args *types.KFServingArgs) (err error)
func SubmitTensorRTServingJob ¶
func SubmitTensorRTServingJob(namespace string, args *types.TensorRTServingArgs) (err error)
func SubmitTensorflowServingJob ¶
func SubmitTensorflowServingJob(namespace string, args *types.TensorFlowServingArgs) (err error)
Types ¶
type CustomServingProcesser ¶
type CustomServingProcesser struct {
// contains filtered or unexported fields
}
CustomServingProcesser use the default processer
func (CustomServingProcesser) FilterServingJobs ¶
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) IsKnownDeployment ¶
func (p CustomServingProcesser) IsKnownDeployment(namespace, name, version string, deployment *appv1.Deployment) bool
func (CustomServingProcesser) IsKnownService ¶
func (CustomServingProcesser) IsSupported ¶
func (CustomServingProcesser) ListServingJobs ¶
func (p CustomServingProcesser) ListServingJobs(namespace string, allNamespace bool) ([]ServingJob, error)
func (CustomServingProcesser) Type ¶
func (p CustomServingProcesser) Type() types.ServingJobType
type KFServingProcesser ¶
type KFServingProcesser struct {
// contains filtered or unexported fields
}
TensorflowServingProcesser use the default processer
func (KFServingProcesser) FilterServingJobs ¶
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) IsKnownDeployment ¶
func (p KFServingProcesser) IsKnownDeployment(namespace, name, version string, deployment *appv1.Deployment) bool
func (KFServingProcesser) IsKnownService ¶
func (KFServingProcesser) IsSupported ¶
func (KFServingProcesser) ListServingJobs ¶
func (p KFServingProcesser) ListServingJobs(namespace string, allNamespace bool) ([]ServingJob, error)
func (KFServingProcesser) Type ¶
func (p KFServingProcesser) 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 map[string]string) ([]ServingJob, error) }
Processer is used to process serving jobs
func NewCustomServingProcesser ¶
func NewCustomServingProcesser() Processer
func NewKFServingProcesser ¶
func NewKFServingProcesser() Processer
func NewTensorflowServingProcesser ¶
func NewTensorflowServingProcesser() Processer
func NewTensorrtServingProcesser ¶
func NewTensorrtServingProcesser() Processer
type ServingJob ¶
type ServingJob interface { // GetName returns the job name Name() string // GetNamespace returns the namespace Namespace() 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 // RequestGPUs returns the gpus which serving job owned RequestGPUs() int // RequestGPUMemory returns the gpu memory,only for gpushare RequestGPUMemory() int // DesiredInstances return the desired instances count DesiredInstances() int // AvailableInstances returns the available instances AvailableInstances() int // Convert2JobInfo convert to ServingJobInfo Convert2JobInfo() types.ServingJobInfo }
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 TensorflowServingProcesser ¶
type TensorflowServingProcesser struct {
// contains filtered or unexported fields
}
TensorflowServingProcesser use the default processer
func (TensorflowServingProcesser) FilterServingJobs ¶
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) IsKnownDeployment ¶
func (p TensorflowServingProcesser) IsKnownDeployment(namespace, name, version string, deployment *appv1.Deployment) bool
func (TensorflowServingProcesser) IsKnownService ¶
func (TensorflowServingProcesser) IsSupported ¶
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 (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) IsKnownDeployment ¶
func (p TensorrtServingProcesser) IsKnownDeployment(namespace, name, version string, deployment *appv1.Deployment) bool
func (TensorrtServingProcesser) IsKnownService ¶
func (TensorrtServingProcesser) IsSupported ¶
func (TensorrtServingProcesser) ListServingJobs ¶
func (p TensorrtServingProcesser) ListServingJobs(namespace string, allNamespace bool) ([]ServingJob, error)
func (TensorrtServingProcesser) Type ¶
func (p TensorrtServingProcesser) Type() types.ServingJobType
Click to show internal directories.
Click to hide internal directories.