v1

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1 is the v1 version of the API. +groupName=kubeflow.org

Index

Constants

View Source
const (
	// EnvKubeflowNamespace is ENV for kubeflow namespace specified by user.
	EnvKubeflowNamespace = "KUBEFLOW_NAMESPACE"

	// DefaultPortName is name of the port used to communicate between scheduler and
	// servers & workers.
	DefaultPortName = "mxjob-port"
	// DefaultContainerName is the name of the MXJob container.
	DefaultContainerName = "mxnet"
	// DefaultPort is default value of the port.
	DefaultPort = 9091
	// DefaultRestartPolicy is default RestartPolicy for MXReplicaSpec.
	DefaultRestartPolicy = commonv1.RestartPolicyNever
)
View Source
const (
	// GroupName is the group name use in this package.
	GroupName = "kubeflow.org"
	// Kind is the kind name.
	Kind = "MXJob"
	// GroupVersion is the version.
	GroupVersion = "v1"
	// Plural is the Plural for MXJob.
	Plural = "mxjobs"
	// Singular is the singular for MXJob.
	Singular = "mxjob"
	// MXCRD is the CRD name for MXJob.
	MXCRD = "mxjobs.kubeflow.org"
)
View Source
const (
	// MXReplicaTypeScheduler is the type for scheduler replica in MXNet.
	MXReplicaTypeScheduler common.ReplicaType = "Scheduler"

	// MXReplicaTypeServer is the type for parameter servers of distributed MXNet.
	MXReplicaTypeServer common.ReplicaType = "Server"

	// MXReplicaTypeWorker is the type for workers of distributed MXNet.
	// This is also used for non-distributed MXNet.
	MXReplicaTypeWorker common.ReplicaType = "Worker"

	// MXReplicaTypeTunerTracker
	// This the auto-tuning tracker e.g. autotvm tracker, it will dispatch tuning task to TunerServer
	MXReplicaTypeTunerTracker common.ReplicaType = "TunerTracker"

	// MXReplicaTypeTunerServer
	MXReplicaTypeTunerServer common.ReplicaType = "TunerServer"

	// MXReplicaTuner is the type for auto-tuning of distributed MXNet.
	// This is also used for non-distributed MXNet.
	MXReplicaTypeTuner common.ReplicaType = "Tuner"
)

Variables

View Source
var (
	// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var (
	// SchemeGroupVersion is the group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: GroupVersion}
	// SchemeGroupVersionKind is the GroupVersionKind of the resource.
	SchemeGroupVersionKind = SchemeGroupVersion.WithKind(Kind)
)

Functions

func Int32

func Int32(v int32) *int32

Int32 is a helper routine that allocates a new int32 value to store v and returns a pointer to it.

func IsScheduler

func IsScheduler(typ commonv1.ReplicaType) bool

IsScheduler returns true if the type is Scheduler.

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group-qualified GroupResource.

func SetDefaults_MXJob

func SetDefaults_MXJob(mxjob *MXJob)

SetDefaults_MXJob sets any unspecified values to defaults.

func SetObjectDefaults_MXJob

func SetObjectDefaults_MXJob(in *MXJob)

func SetObjectDefaults_MXJobList

func SetObjectDefaults_MXJobList(in *MXJobList)

Types

type JobModeType

type JobModeType string

JobModeType id the type for JobMode

const (
	// Train Mode, in this mode requested MXReplicaSpecs need
	// has Server, Scheduler, Worker
	MXTrain JobModeType = "MXTrain"

	// Tune Mode, in this mode requested MXReplicaSpecs need
	// has Tuner
	MXTune JobModeType = "MXTune"
)

type MXJob

type MXJob struct {
	metav1.TypeMeta `json:",inline"`

	// Standard object's metadata.
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Specification of the desired behavior of the MXJob.
	Spec MXJobSpec `json:"spec,omitempty"`

	// Most recently observed status of the MXJob.
	// This data may not be up to date.
	// Populated by the system.
	// Read-only.
	Status common.JobStatus `json:"status,omitempty"`
}

MXJob represents the configuration of signal MXJob

func (*MXJob) DeepCopy

func (in *MXJob) DeepCopy() *MXJob

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MXJob.

func (*MXJob) DeepCopyInto

func (in *MXJob) DeepCopyInto(out *MXJob)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MXJob) DeepCopyObject

func (in *MXJob) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MXJobList

type MXJobList struct {
	metav1.TypeMeta `json:",inline"`

	// Standard list metadata.
	metav1.ListMeta `json:"metadata,omitempty"`

	// List of MXJobs.
	Items []MXJob `json:"items"`
}

MXJobList is a list of MXJobs.

func (*MXJobList) DeepCopy

func (in *MXJobList) DeepCopy() *MXJobList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MXJobList.

func (*MXJobList) DeepCopyInto

func (in *MXJobList) DeepCopyInto(out *MXJobList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MXJobList) DeepCopyObject

func (in *MXJobList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MXJobSpec

type MXJobSpec struct {
	// RunPolicy encapsulates various runtime policies of the distributed training
	// job, for example how to clean up resources and how long the job can stay
	// active.
	RunPolicy common.RunPolicy `json:",inline"`

	// JobMode specify the kind of MXjob to do. Different mode may have
	// different MXReplicaSpecs request
	JobMode JobModeType `json:"jobMode"`

	// MXReplicaSpecs is map of common.ReplicaType and common.ReplicaSpec
	// specifies the MX replicas to run.
	// For example,
	//   {
	//     "Scheduler": common.ReplicaSpec,
	//     "Server": common.ReplicaSpec,
	//     "Worker": common.ReplicaSpec,
	//   }
	MXReplicaSpecs map[common.ReplicaType]*common.ReplicaSpec `json:"mxReplicaSpecs"`
}

MXJobSpec is a desired state description of the MXJob.

func (*MXJobSpec) DeepCopy

func (in *MXJobSpec) DeepCopy() *MXJobSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MXJobSpec.

func (*MXJobSpec) DeepCopyInto

func (in *MXJobSpec) DeepCopyInto(out *MXJobSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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