arenaclient

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: Apache-2.0, Apache-2.0 Imports: 21 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArenaClient

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

ArenaClient is a client which includes operations: 1.manage training jobs,like:

  • submit a training job
  • get a training job information
  • get job logs
  • delete a job

TODO: 2.manage serving job TODO: 3.manage node it serves for commands and apis

func NewArenaClient

func NewArenaClient(args types.ArenaClientArgs) (*ArenaClient, error)

NewArenaClient creates a ArenaClient

func (*ArenaClient) Cron added in v0.8.2

func (a *ArenaClient) Cron() *CronClient

Serving returns the Cron client

func (*ArenaClient) Data

func (a *ArenaClient) Data() *DataClient

func (*ArenaClient) Evaluate added in v0.8.8

func (a *ArenaClient) Evaluate() *EvaluateClient

func (*ArenaClient) Node

func (a *ArenaClient) Node() *NodeClient

func (*ArenaClient) Serving

func (a *ArenaClient) Serving() *ServingJobClient

Serving returns the Serving job client

func (*ArenaClient) Training

func (a *ArenaClient) Training() *TrainingJobClient

Training returns the Training Job Client

type CronClient added in v0.8.2

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

func NewCronClient added in v0.8.2

func NewCronClient(namespace string, configer *config.ArenaConfiger) *CronClient

NewCronClient creates a CronClient

func (*CronClient) Delete added in v0.8.2

func (c *CronClient) Delete(names ...string) error

func (*CronClient) Get added in v0.8.2

func (c *CronClient) Get(name string) (*types.CronInfo, error)

func (*CronClient) GetAndPrint added in v0.8.2

func (c *CronClient) GetAndPrint(name string, format string) error

func (*CronClient) List added in v0.8.2

func (c *CronClient) List(allNamespaces bool) ([]*types.CronInfo, error)

List return all cron task

func (*CronClient) ListAndPrint added in v0.8.2

func (c *CronClient) ListAndPrint(allNamespaces bool, format string) error

ListAndPrint lists and prints the job informations

func (*CronClient) Namespace added in v0.8.2

func (c *CronClient) Namespace(namespace string) *CronClient

Namespace sets the namespace,this operation does not change the default namespace

func (*CronClient) Resume added in v0.8.2

func (c *CronClient) Resume(name string) error

func (*CronClient) SubmitCronTrainingJob added in v0.8.2

func (c *CronClient) SubmitCronTrainingJob(job *apiscron.Job) error

Submit submits a training job

func (*CronClient) Suspend added in v0.8.2

func (c *CronClient) Suspend(name string) error

type DataClient

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

func NewDataClient

func NewDataClient(namespace string, configer *config.ArenaConfiger) *DataClient

NewDataClient creates a ServingJobClient

func (*DataClient) ListAndPrintDataVolumes

func (d *DataClient) ListAndPrintDataVolumes(namespace string, allNamespaces bool) error

func (*DataClient) Namespace

func (d *DataClient) Namespace(namespace string) *DataClient

Namespace sets the namespace,this operation does not change the default namespace

type EvaluateClient added in v0.8.8

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

func NewEvaluateClient added in v0.8.8

func NewEvaluateClient(namespace string, configer *config.ArenaConfiger) *EvaluateClient

NewEvaluateClient creates a EvaluateClient

func (*EvaluateClient) Delete added in v0.8.8

func (c *EvaluateClient) Delete(names ...string) error

func (*EvaluateClient) Get added in v0.8.8

func (c *EvaluateClient) Get(name, namespace string) (*types.EvaluateJobInfo, error)

func (*EvaluateClient) GetAndPrint added in v0.8.8

func (c *EvaluateClient) GetAndPrint(name string, format string) error

func (*EvaluateClient) List added in v0.8.8

func (c *EvaluateClient) List(allNamespaces bool) ([]*types.EvaluateJobInfo, error)

func (*EvaluateClient) ListAndPrint added in v0.8.8

func (c *EvaluateClient) ListAndPrint(allNamespaces bool, format string) error

func (*EvaluateClient) Namespace added in v0.8.8

func (c *EvaluateClient) Namespace(namespace string) *EvaluateClient

Namespace sets the namespace,this operation does not change the default namespace

func (*EvaluateClient) SubmitEvaluateJob added in v0.8.8

func (c *EvaluateClient) SubmitEvaluateJob(job *apievaluate.EvaluateJob) error

SubmitEvaluateJob submits a evaluate job

type NodeClient

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

func NewNodeClient

func NewNodeClient(namespace string, configer *config.ArenaConfiger) *NodeClient

NewNodeClient creates a ServingJobClient

func (*NodeClient) Details

func (t *NodeClient) Details(nodeNames []string, nodeType types.NodeType, showMetric bool) (types.AllNodeInfo, error)

Details is used to serve api

func (*NodeClient) ListAndPrintNodes

func (t *NodeClient) ListAndPrintNodes(nodeNames []string, nodeType types.NodeType, format types.FormatStyle, details bool, notStop bool, showMetric bool) error

ListAndPrintNodes is used to display nodes informations

func (*NodeClient) Namespace

func (t *NodeClient) Namespace(namespace string) *NodeClient

Namespace sets the namespace,this operation does not change the default namespace

type ServingJobClient

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

ServingJobClient provides some operators for managing serving jobs.

func NewServingJobClient

func NewServingJobClient(namespace string, configer *config.ArenaConfiger) *ServingJobClient

NewServingJobClient creates a ServingJobClient

func (*ServingJobClient) Attach added in v0.8.0

func (t *ServingJobClient) Attach(jobName, version string, jobType types.ServingJobType, args *podexec.AttachPodArgs) error

func (*ServingJobClient) Delete

func (t *ServingJobClient) Delete(jobType types.ServingJobType, version string, jobNames ...string) error

Delete deletes the target serving job

func (*ServingJobClient) Get

func (t *ServingJobClient) Get(jobName, version string, jobType types.ServingJobType) (*types.ServingJobInfo, error)

Get returns a serving job information

func (*ServingJobClient) GetAndPrint

func (t *ServingJobClient) GetAndPrint(jobName, version string, jobType types.ServingJobType, format string) error

GetAndPrint print serving job information

func (*ServingJobClient) List

func (t *ServingJobClient) List(allNamespaces bool, servingType types.ServingJobType) ([]*types.ServingJobInfo, error)

List returns all serving jobs

func (*ServingJobClient) ListAndPrint

func (t *ServingJobClient) ListAndPrint(allNamespaces bool, servingType types.ServingJobType, format string) error

ListAndPrint lists and prints the job informations

func (*ServingJobClient) Logs

func (t *ServingJobClient) Logs(jobName, version string, jobType types.ServingJobType, args *types.LogArgs) error

Logs returns the serving job log

func (*ServingJobClient) Namespace

func (t *ServingJobClient) Namespace(namespace string) *ServingJobClient

Namespace sets the namespace,this operation does not change the default namespace

func (*ServingJobClient) Submit

func (t *ServingJobClient) Submit(job *apiserving.Job) error

Submit submits a serving job

func (*ServingJobClient) TrafficRouterSplit

func (t *ServingJobClient) TrafficRouterSplit(args *types.TrafficRouterSplitArgs) error

func (*ServingJobClient) Update added in v0.8.9

func (t *ServingJobClient) Update(job *apiserving.Job) error

Update update a serving job

type TrainingJobClient

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

TrainingJobClient provides some operators for managing training jobs.

func NewTrainingJobClient

func NewTrainingJobClient(namespace, arenaSystemNamespace string, configer *config.ArenaConfiger) *TrainingJobClient

NewTrainingJobClient creates a TrainingJobClient

func (*TrainingJobClient) Attach added in v0.8.0

func (t *TrainingJobClient) Attach(jobName string, jobType types.TrainingJobType, args *podexec.AttachPodArgs) error

func (*TrainingJobClient) Delete

func (t *TrainingJobClient) Delete(jobType types.TrainingJobType, jobNames ...string) error

Delete deletes the target training job

func (*TrainingJobClient) Get

Get returns a training job information

func (*TrainingJobClient) GetAndPrint

func (t *TrainingJobClient) GetAndPrint(jobName string, jobType types.TrainingJobType, format string, showEvent bool, showGPU bool) error

GetAndPrint print training job information

func (*TrainingJobClient) List

func (t *TrainingJobClient) List(allNamespaces bool, trainingType types.TrainingJobType) ([]*types.TrainingJobInfo, error)

List returns all training jobs

func (*TrainingJobClient) ListAndPrint

func (t *TrainingJobClient) ListAndPrint(allNamespaces bool, format string, trainingType types.TrainingJobType) error

ListAndPrint lists and prints the job informations

func (*TrainingJobClient) LogViewer

func (t *TrainingJobClient) LogViewer(jobName string, jobType types.TrainingJobType) ([]string, error)

LogViewer returns the log viewer

func (*TrainingJobClient) Logs

func (t *TrainingJobClient) Logs(jobName string, jobType types.TrainingJobType, args *types.LogArgs) error

Logs returns the training job log

func (*TrainingJobClient) Namespace

func (t *TrainingJobClient) Namespace(namespace string) *TrainingJobClient

Namespace sets the namespace

func (*TrainingJobClient) Prune

func (t *TrainingJobClient) Prune(allNamespaces bool, since time.Duration) error

Prune cleans the not running training jobs

func (*TrainingJobClient) ScaleIn

func (t *TrainingJobClient) ScaleIn(job *apistraining.Job) error

ScaleIn scales in job

func (*TrainingJobClient) ScaleOut

func (t *TrainingJobClient) ScaleOut(job *apistraining.Job) error

ScaleOut scales out job

func (*TrainingJobClient) Submit

func (t *TrainingJobClient) Submit(job *apistraining.Job) error

Submit submits a training job

func (*TrainingJobClient) Top

func (t *TrainingJobClient) Top(args []string, allNamespaces bool, jobType types.TrainingJobType, instanceName string, notStop bool, format types.FormatStyle) error

Jump to

Keyboard shortcuts

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