model

package
v0.0.0-...-1dfa148 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

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() []*v1.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 ListModelJobs(namespace string, allNamespaces bool, modelJobType types.ModelJobType) ([]ModelJob, error)

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

Jump to

Keyboard shortcuts

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