Documentation
¶
Index ¶
- func DeleteModelJob(namespace, name string, jobType types.ModelJobType) error
- func PrintAllModelJobs(jobs []ModelJob, allNamespaces bool, format types.FormatStyle)
- func PrintModelJob(job ModelJob, format types.FormatStyle)
- func SubmitModelBenchmarkJob(namespace string, args *types.ModelBenchmarkArgs) error
- func SubmitModelEvaluateJob(namespace string, args *types.ModelEvaluateArgs) error
- func SubmitModelOptimizeJob(namespace string, args *types.ModelOptimizeArgs) error
- func SubmitModelProfileJob(namespace string, args *types.ModelProfileArgs) error
- type ModelJob
- type Processor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteModelJob ¶
func DeleteModelJob(namespace, name string, jobType types.ModelJobType) error
func PrintAllModelJobs ¶
func PrintAllModelJobs(jobs []ModelJob, allNamespaces bool, format types.FormatStyle)
func PrintModelJob ¶
func PrintModelJob(job ModelJob, format types.FormatStyle)
func SubmitModelBenchmarkJob ¶
func SubmitModelBenchmarkJob(namespace string, args *types.ModelBenchmarkArgs) error
func SubmitModelEvaluateJob ¶
func SubmitModelEvaluateJob(namespace string, args *types.ModelEvaluateArgs) error
func SubmitModelOptimizeJob ¶
func SubmitModelOptimizeJob(namespace string, args *types.ModelOptimizeArgs) error
func SubmitModelProfileJob ¶
func SubmitModelProfileJob(namespace string, args *types.ModelProfileArgs) error
Types ¶
type ModelJob ¶
type ModelJob interface {
// Name return the job name
Name() string
// Namespace return the namespace
Namespace() string
// Type return the type
Type() types.ModelJobType
// Pods return the job pods
Pods() []*corev1.Pod
// Job return the job
Job() *batchv1.Job
// Age return the job age
Age() time.Duration
// Duration return the job duration
Duration() time.Duration
// Status return the job status
Status() string
// StartTime return start time
StartTime() *metav1.Time
// RequestCPUs return the cpus which model job owned
RequestCPUs() int64
// RequestGPUs return the gpus which model job owned
RequestGPUs() int64
// RequestGPUMemory return the gpu memory,only for gpushare
RequestGPUMemory() int64
// RequestGPUCore return the gpu core,only for gpushare
RequestGPUCore() int64
// Params return the job parameters
Params() map[string]string
// Convert2JobInfo convert to ModelJobInfo
Convert2JobInfo() types.ModelJobInfo
}
func ListModelJobs ¶
func SearchModelJob ¶
func SearchModelJob(namespace, name string, modelJobType types.ModelJobType) (ModelJob, error)
type Processor ¶
type Processor interface {
// Type returns the processor type
Type() types.ModelJobType
// GetModelJob is used to get a model job
GetModelJob(namespace, name string) (ModelJob, error)
// ListModelJobs is used to list all model jobs
ListModelJobs(namespace string, allNamespace bool) ([]ModelJob, error)
}
func NewModelProcessor ¶
func NewModelProcessor(jobType types.ModelJobType) Processor
Click to show internal directories.
Click to hide internal directories.