types

package
v0.3.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KubeConfig string
View Source
var SERVING_CHARTS = map[string]string{
	"tensorflow-serving-0.2.0":        "Tensorflow",
	"tensorrt-inference-server-0.0.1": "TensorRT",
}

Functions

func DefinePodPhaseStatus added in v0.3.0

func DefinePodPhaseStatus(pod v1.Pod) (string, int, int, int)

func IsPodControllerByDeploment

func IsPodControllerByDeploment(pod v1.Pod, deploy app_v1.Deployment) bool

Types

type Instance

type Instance struct {
	// the status of of instance
	Status string `json:"status"`
	// the name of instance
	Name string `json:"name"`
	// the age of instance
	Age string `json:"age"`
	// the node instance runs on
	Node string `json:"node"`
	// the instance is chief or not
	IsChief bool `json:"chief" yaml:"chief"`
}

type JobInfo

type JobInfo struct {
	// The name of the training job
	Name string `json:"name"`
	// The namespace of the training job
	Namespace string `json:"namespace"`
	// The time of the training job
	Duration string `json:"duration"`
	// The status of the training Job
	Status JobStatus `json:"status"`

	// The training type of the training job
	Trainer string `json:"trainer"`
	// The tensorboard of the training job
	Tensorboard string `json:"tensorboard,omitempty"`

	// The name of the chief Instance
	ChiefName string `json:"chiefName" yaml:"chiefName"`

	// The instances under the training job
	Instances []Instance `json:"instances"`

	// The priority of the training job
	Priority string `json:"priority"`
}

type JobStatus

type JobStatus string

all the kinds of JobStatus

const (
	// JobPending means the job is pending
	JobPending JobStatus = "PENDING"
	// JobRunning means the job is running
	JobRunning JobStatus = "RUNNING"
	// JobSucceeded means the job is Succeeded
	JobSucceeded JobStatus = "SUCCEEDED"
	// JobFailed means the job is failed
	JobFailed JobStatus = "FAILED"
)

type Serving

type Serving struct {
	Name      string      `yaml:"name" json:"name"`
	Namespace string      `yaml:"namespace" json:"namespace"`
	ServeType ServingType `yaml:"serving_type" json:"serving_type"`
	Version   string      `yaml:"version" json:"version"`
	// contains filtered or unexported fields
}

func NewServingJob

func NewServingJob(client *kubernetes.Clientset, deploy app_v1.Deployment, allPods []v1.Pod) Serving

func (Serving) AllPods

func (s Serving) AllPods() []v1.Pod

func (Serving) AllSvcs added in v0.3.0

func (s Serving) AllSvcs() (svcs []v1.Service)

func (Serving) AvailableInstances added in v0.3.0

func (s Serving) AvailableInstances() int32

Available instances

func (Serving) DesiredInstances added in v0.3.0

func (s Serving) DesiredInstances() int32

Desired Instances

func (Serving) GetAge added in v0.3.0

func (s Serving) GetAge() string

GetAge returns the time string for serving job is running

func (Serving) GetClusterIP

func (s Serving) GetClusterIP() string

Cluster IP

func (Serving) GetName

func (s Serving) GetName() string

func (Serving) GetPorts added in v0.3.0

func (s Serving) GetPorts() string

func (Serving) GetStatus

func (s Serving) GetStatus() string

type ServingType added in v0.3.0

type ServingType string
const (
	// tensorflow
	ServingTF ServingType = "TENSORFLOW"
	// tensorrt
	ServingTRT ServingType = "TENSORRT"
	// custom
	ServingCustom ServingType = "CUSTOM"
)

three serving types.

func KeyMapServingType added in v0.3.0

func KeyMapServingType(servingKey string) ServingType

type TrainingJobInfo

type TrainingJobInfo struct {
	Name      string
	Type      string
	Namespace string
}

Jump to

Keyboard shortcuts

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