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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

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

Job defines the base job

func NewJob

func NewJob(name string, jobType types.ModelJobType, args interface{}) *Job

func (*Job) Args

func (b *Job) Args() interface{}

func (*Job) Name

func (b *Job) Name() string

func (*Job) Type

func (j *Job) Type() types.ModelJobType

type ModelBenchmarkArgsBuilder

type ModelBenchmarkArgsBuilder struct {
	argsbuilder.ArgsBuilder
	// contains filtered or unexported fields
}

func NewModelBenchmarkArgsBuilder

func NewModelBenchmarkArgsBuilder() *ModelBenchmarkArgsBuilder

func (*ModelBenchmarkArgsBuilder) Annotations

func (m *ModelBenchmarkArgsBuilder) Annotations(annotations map[string]string) *ModelBenchmarkArgsBuilder

Annotations is used to add annotations for job pods,match option --annotation

func (*ModelBenchmarkArgsBuilder) Build

func (m *ModelBenchmarkArgsBuilder) Build() (*Job, error)

Build is used to build the job

func (*ModelBenchmarkArgsBuilder) CPU

CPU assign cpu limits,match the option --cpu

func (*ModelBenchmarkArgsBuilder) Command

Command is used to set job command

func (*ModelBenchmarkArgsBuilder) Concurrency

func (m *ModelBenchmarkArgsBuilder) Concurrency(concurrency int) *ModelBenchmarkArgsBuilder

Concurrency is used to specify number of concurrently to run

func (*ModelBenchmarkArgsBuilder) DataDirs

DataDirs is used to mount host files to job containers,match option --data-dir

func (*ModelBenchmarkArgsBuilder) Datas

Datas is used to mount k8s pvc to job pods,match option --data

func (*ModelBenchmarkArgsBuilder) Duration

Duration is used to specify benchmark duration

func (*ModelBenchmarkArgsBuilder) Envs

Envs is used to set env of job containers,match option --env

func (*ModelBenchmarkArgsBuilder) GPUCore

GPUCore is used to set gpu core for the job,match the option --gpucore

func (*ModelBenchmarkArgsBuilder) GPUCount

GPUCount is used to set count of gpu for the job,match the option --gpus

func (*ModelBenchmarkArgsBuilder) GPUMemory

GPUMemory is used to set gpu memory for the job,match the option --gpumemory

func (*ModelBenchmarkArgsBuilder) Image

Image is used to set job image,match the option --image

func (*ModelBenchmarkArgsBuilder) ImagePullPolicy

func (m *ModelBenchmarkArgsBuilder) ImagePullPolicy(policy string) *ModelBenchmarkArgsBuilder

ImagePullPolicy is used to set image pull policy,match the option --image-pull-policy

func (*ModelBenchmarkArgsBuilder) ImagePullSecrets

func (m *ModelBenchmarkArgsBuilder) ImagePullSecrets(secrets []string) *ModelBenchmarkArgsBuilder

ImagePullSecrets is used to set image pull secrests,match option --image-pull-secret

func (*ModelBenchmarkArgsBuilder) Inputs

Inputs is used to specify model inputs

func (*ModelBenchmarkArgsBuilder) Labels

Labels is used to add labels for job

func (*ModelBenchmarkArgsBuilder) Memory

Memory assign memory limits,match option --memory

func (*ModelBenchmarkArgsBuilder) ModelConfigFile

func (m *ModelBenchmarkArgsBuilder) ModelConfigFile(filePath string) *ModelBenchmarkArgsBuilder

ModelConfigFile is used to set model config file,match the option --model-config-file

func (*ModelBenchmarkArgsBuilder) ModelName

ModelName is used to set model name,match the option --model-name

func (*ModelBenchmarkArgsBuilder) ModelPath

ModelPath is used to set model path,match the option --model-path

func (*ModelBenchmarkArgsBuilder) Name

Name is used to set job name,match option --name

func (*ModelBenchmarkArgsBuilder) Namespace

Namespace is used to set job namespace,match option --namespace

func (*ModelBenchmarkArgsBuilder) NodeSelectors

func (m *ModelBenchmarkArgsBuilder) NodeSelectors(selectors map[string]string) *ModelBenchmarkArgsBuilder

NodeSelectors is used to set node selectors for scheduling job,match option --selector

func (*ModelBenchmarkArgsBuilder) Outputs

Outputs is used to specify model outputs

func (*ModelBenchmarkArgsBuilder) ReportPath

func (m *ModelBenchmarkArgsBuilder) ReportPath(reportPath string) *ModelBenchmarkArgsBuilder

ReportPath is used to specify benchmark result saved path

func (*ModelBenchmarkArgsBuilder) Requests

Requests is used to specify number of requests to run

func (*ModelBenchmarkArgsBuilder) Shell

Shell is used to specify linux shell type

func (*ModelBenchmarkArgsBuilder) Tolerations

func (m *ModelBenchmarkArgsBuilder) Tolerations(tolerations []string) *ModelBenchmarkArgsBuilder

Tolerations is used to set tolerations for tolerate nodes,match option --toleration

type ModelEvaluateJobBuilder

type ModelEvaluateJobBuilder struct {
	argsbuilder.ArgsBuilder
	// contains filtered or unexported fields
}

func NewModelEvaluateJobBuilder

func NewModelEvaluateJobBuilder() *ModelEvaluateJobBuilder

func (*ModelEvaluateJobBuilder) Annotations

func (m *ModelEvaluateJobBuilder) Annotations(annotations map[string]string) *ModelEvaluateJobBuilder

Annotations is used to add annotations for job pods,match option --annotation

func (*ModelEvaluateJobBuilder) BatchSize

func (m *ModelEvaluateJobBuilder) BatchSize(batchSize int) *ModelEvaluateJobBuilder

BatchSize is the batch size of evaluate

func (*ModelEvaluateJobBuilder) Build

func (m *ModelEvaluateJobBuilder) Build() (*Job, error)

Build is used to build the job

func (*ModelEvaluateJobBuilder) CPU

CPU assign cpu limits,match the option --cpu

func (*ModelEvaluateJobBuilder) Command

Command is used to set job command

func (*ModelEvaluateJobBuilder) DataDirs

DataDirs is used to mount host files to job containers,match option --data-dir

func (*ModelEvaluateJobBuilder) Datas

Datas is used to mount k8s pvc to job pods,match option --data

func (*ModelEvaluateJobBuilder) DatasetPath

func (m *ModelEvaluateJobBuilder) DatasetPath(datasetPath string) *ModelEvaluateJobBuilder

DatasetPath is the dataset to evaluate model

func (*ModelEvaluateJobBuilder) Envs

Envs is used to set env of job containers,match option --env

func (*ModelEvaluateJobBuilder) GPUCore

GPUCore is used to set gpu core for the job,match the option --gpumemory

func (*ModelEvaluateJobBuilder) GPUCount

GPUCount is used to set count of gpu for the job,match the option --gpus

func (*ModelEvaluateJobBuilder) GPUMemory

func (m *ModelEvaluateJobBuilder) GPUMemory(memory int) *ModelEvaluateJobBuilder

GPUMemory is used to set gpu memory for the job,match the option --gpumemory

func (*ModelEvaluateJobBuilder) Image

Image is used to set job image,match the option --image

func (*ModelEvaluateJobBuilder) ImagePullPolicy

func (m *ModelEvaluateJobBuilder) ImagePullPolicy(policy string) *ModelEvaluateJobBuilder

ImagePullPolicy is used to set image pull policy,match the option --image-pull-policy

func (*ModelEvaluateJobBuilder) ImagePullSecrets

func (m *ModelEvaluateJobBuilder) ImagePullSecrets(secrets []string) *ModelEvaluateJobBuilder

ImagePullSecrets is used to set image pull secrests,match option --image-pull-secret

func (*ModelEvaluateJobBuilder) Labels

Labels is used to add labels for job

func (*ModelEvaluateJobBuilder) Memory

Memory assign memory limits,match option --memory

func (*ModelEvaluateJobBuilder) ModelPath

ModelPath is used to set model path,match the option --model-path

func (*ModelEvaluateJobBuilder) ModelPlatform

func (m *ModelEvaluateJobBuilder) ModelPlatform(modelPlatform string) *ModelEvaluateJobBuilder

ModelPlatform specify the model platform, such as torchscript/tensorflow

func (*ModelEvaluateJobBuilder) Name

Name is used to set job name,match option --name

func (*ModelEvaluateJobBuilder) Namespace

func (m *ModelEvaluateJobBuilder) Namespace(namespace string) *ModelEvaluateJobBuilder

Namespace is used to set job namespace,match option --namespace

func (*ModelEvaluateJobBuilder) NodeSelectors

func (m *ModelEvaluateJobBuilder) NodeSelectors(selectors map[string]string) *ModelEvaluateJobBuilder

NodeSelectors is used to set node selectors for scheduling job,match option --selector

func (*ModelEvaluateJobBuilder) ReportPath

func (m *ModelEvaluateJobBuilder) ReportPath(reportPath string) *ModelEvaluateJobBuilder

ReportPath is used to specify evaluate result path

func (*ModelEvaluateJobBuilder) Shell

Shell is used to specify linux shell type

func (*ModelEvaluateJobBuilder) SyncImage

SyncImage is used to set syncing image,match option --sync-image

func (*ModelEvaluateJobBuilder) SyncMode

SyncMode is used to set syncing mode,match option --sync-mode

func (*ModelEvaluateJobBuilder) SyncSource

SyncSource is used to set syncing source,match option --sync-source

func (*ModelEvaluateJobBuilder) Tolerations

func (m *ModelEvaluateJobBuilder) Tolerations(tolerations []string) *ModelEvaluateJobBuilder

Tolerations is used to set tolerations for tolerate nodes,match option --toleration

type ModelOptimizeJobBuilder

type ModelOptimizeJobBuilder struct {
	argsbuilder.ArgsBuilder
	// contains filtered or unexported fields
}

func NewModelOptimizeJobBuilder

func NewModelOptimizeJobBuilder() *ModelOptimizeJobBuilder

func (*ModelOptimizeJobBuilder) Annotations

func (m *ModelOptimizeJobBuilder) Annotations(annotations map[string]string) *ModelOptimizeJobBuilder

Annotations is used to add annotations for job pods,match option --annotation

func (*ModelOptimizeJobBuilder) Build

func (m *ModelOptimizeJobBuilder) Build() (*Job, error)

Build is used to build the job

func (*ModelOptimizeJobBuilder) CPU

CPU assign cpu limits,match the option --cpu

func (*ModelOptimizeJobBuilder) Command

Command is used to set job command

func (*ModelOptimizeJobBuilder) DataDirs

DataDirs is used to mount host files to job containers,match option --data-dir

func (*ModelOptimizeJobBuilder) Datas

Datas is used to mount k8s pvc to job pods,match option --data

func (*ModelOptimizeJobBuilder) Envs

Envs is used to set env of job containers,match option --env

func (*ModelOptimizeJobBuilder) ExportPath

func (m *ModelOptimizeJobBuilder) ExportPath(exportPath string) *ModelOptimizeJobBuilder

ExportPath is used to specify optimized model save path

func (*ModelOptimizeJobBuilder) GPUCore

GPUCore is used to set gpu core for the job, match the option --gpucore

func (*ModelOptimizeJobBuilder) GPUCount

GPUCount is used to set count of gpu for the job,match the option --gpus

func (*ModelOptimizeJobBuilder) GPUMemory

func (m *ModelOptimizeJobBuilder) GPUMemory(memory int) *ModelOptimizeJobBuilder

GPUMemory is used to set gpu memory for the job,match the option --gpumemory

func (*ModelOptimizeJobBuilder) Image

Image is used to set job image,match the option --image

func (*ModelOptimizeJobBuilder) ImagePullPolicy

func (m *ModelOptimizeJobBuilder) ImagePullPolicy(policy string) *ModelOptimizeJobBuilder

ImagePullPolicy is used to set image pull policy,match the option --image-pull-policy

func (*ModelOptimizeJobBuilder) ImagePullSecrets

func (m *ModelOptimizeJobBuilder) ImagePullSecrets(secrets []string) *ModelOptimizeJobBuilder

ImagePullSecrets is used to set image pull secrests,match option --image-pull-secret

func (*ModelOptimizeJobBuilder) Inputs

Inputs is used to specify model inputs

func (*ModelOptimizeJobBuilder) Labels

Labels is used to add labels for job

func (*ModelOptimizeJobBuilder) Memory

Memory assign memory limits,match option --memory

func (*ModelOptimizeJobBuilder) ModelConfigFile

func (m *ModelOptimizeJobBuilder) ModelConfigFile(filePath string) *ModelOptimizeJobBuilder

ModelConfigFile is used to set model config file,match the option --model-config-file

func (*ModelOptimizeJobBuilder) ModelName

ModelName is used to set model name,match the option --model-name

func (*ModelOptimizeJobBuilder) ModelPath

ModelPath is used to set model path,match the option --model-path

func (*ModelOptimizeJobBuilder) Name

Name is used to set job name,match option --name

func (*ModelOptimizeJobBuilder) Namespace

func (m *ModelOptimizeJobBuilder) Namespace(namespace string) *ModelOptimizeJobBuilder

Namespace is used to set job namespace,match option --namespace

func (*ModelOptimizeJobBuilder) NodeSelectors

func (m *ModelOptimizeJobBuilder) NodeSelectors(selectors map[string]string) *ModelOptimizeJobBuilder

NodeSelectors is used to set node selectors for scheduling job,match option --selector

func (*ModelOptimizeJobBuilder) Optimizer

func (m *ModelOptimizeJobBuilder) Optimizer(optimizer string) *ModelOptimizeJobBuilder

Optimizer is used to specify optimized model save path

func (*ModelOptimizeJobBuilder) Outputs

Outputs is used to specify model outputs

func (*ModelOptimizeJobBuilder) Shell

Shell is used to specify linux shell type

func (*ModelOptimizeJobBuilder) TargetDevice

func (m *ModelOptimizeJobBuilder) TargetDevice(targetDevice string) *ModelOptimizeJobBuilder

TargetDevice is used to specify model deploy device

func (*ModelOptimizeJobBuilder) Tolerations

func (m *ModelOptimizeJobBuilder) Tolerations(tolerations []string) *ModelOptimizeJobBuilder

Tolerations is used to set tolerations for tolerate nodes,match option --toleration

type ModelProfileJobBuilder

type ModelProfileJobBuilder struct {
	argsbuilder.ArgsBuilder
	// contains filtered or unexported fields
}

func NewModelProfileJobBuilder

func NewModelProfileJobBuilder() *ModelProfileJobBuilder

func (*ModelProfileJobBuilder) Annotations

func (m *ModelProfileJobBuilder) Annotations(annotations map[string]string) *ModelProfileJobBuilder

Annotations is used to add annotations for job pods,match option --annotation

func (*ModelProfileJobBuilder) Build

func (m *ModelProfileJobBuilder) Build() (*Job, error)

Build is used to build the job

func (*ModelProfileJobBuilder) CPU

CPU assign cpu limits,match the option --cpu

func (*ModelProfileJobBuilder) Command

Command is used to set job command

func (*ModelProfileJobBuilder) DataDirs

func (m *ModelProfileJobBuilder) DataDirs(volumes map[string]string) *ModelProfileJobBuilder

DataDirs is used to mount host files to job containers,match option --data-dir

func (*ModelProfileJobBuilder) Datas

Datas is used to mount k8s pvc to job pods,match option --data

func (*ModelProfileJobBuilder) Envs

Envs is used to set env of job containers,match option --env

func (*ModelProfileJobBuilder) GPUCore

GPUCore is used to set gpu core for the job,match the option --gpucore

func (*ModelProfileJobBuilder) GPUCount

GPUCount is used to set count of gpu for the job,match the option --gpus

func (*ModelProfileJobBuilder) GPUMemory

func (m *ModelProfileJobBuilder) GPUMemory(memory int) *ModelProfileJobBuilder

GPUMemory is used to set gpu memory for the job,match the option --gpumemory

func (*ModelProfileJobBuilder) Image

Image is used to set job image,match the option --image

func (*ModelProfileJobBuilder) ImagePullPolicy

func (m *ModelProfileJobBuilder) ImagePullPolicy(policy string) *ModelProfileJobBuilder

ImagePullPolicy is used to set image pull policy,match the option --image-pull-policy

func (*ModelProfileJobBuilder) ImagePullSecrets

func (m *ModelProfileJobBuilder) ImagePullSecrets(secrets []string) *ModelProfileJobBuilder

ImagePullSecrets is used to set image pull secrests,match option --image-pull-secret

func (*ModelProfileJobBuilder) Inputs

Inputs is used to specify model inputs

func (*ModelProfileJobBuilder) Labels

Labels is used to add labels for job

func (*ModelProfileJobBuilder) Memory

Memory assign memory limits,match option --memory

func (*ModelProfileJobBuilder) ModelConfigFile

func (m *ModelProfileJobBuilder) ModelConfigFile(filePath string) *ModelProfileJobBuilder

ModelConfigFile is used to set model config file,match the option --model-config-file

func (*ModelProfileJobBuilder) ModelName

ModelName is used to set model name,match the option --model-name

func (*ModelProfileJobBuilder) ModelPath

ModelPath is used to set model path,match the option --model-path

func (*ModelProfileJobBuilder) Name

Name is used to set job name,match option --name

func (*ModelProfileJobBuilder) Namespace

func (m *ModelProfileJobBuilder) Namespace(namespace string) *ModelProfileJobBuilder

Namespace is used to set job namespace,match option --namespace

func (*ModelProfileJobBuilder) NodeSelectors

func (m *ModelProfileJobBuilder) NodeSelectors(selectors map[string]string) *ModelProfileJobBuilder

NodeSelectors is used to set node selectors for scheduling job,match option --selector

func (*ModelProfileJobBuilder) Outputs

Outputs is used to specify model outputs

func (*ModelProfileJobBuilder) ReportPath

func (m *ModelProfileJobBuilder) ReportPath(reportPath string) *ModelProfileJobBuilder

ReportPath is used to specify profile result path

func (*ModelProfileJobBuilder) Shell

Shell is used to specify linux shell type

func (*ModelProfileJobBuilder) Tolerations

func (m *ModelProfileJobBuilder) Tolerations(tolerations []string) *ModelProfileJobBuilder

Tolerations is used to set tolerations for tolerate nodes,match option --toleration

Jump to

Keyboard shortcuts

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