v1

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

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

Package v1 contains API Schema definitions for the kubeflow.org v1 API group +kubebuilder:object:generate=true +groupName=kubeflow.org

Index

Constants

View Source
const (
	// 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
	// Kind is the kind name.
	Kind = "MXJob"
	// Plural is the Plural for mxJob.
	Plural = "mxjobs"
	// Singular is the singular for mxJob.
	Singular = "mxjob"
	// FrameworkName is the name of the ML Framework
	FrameworkName = "mxnet"
)
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 (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "kubeflow.org", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = GroupVersion

SchemeGroupVersion is group version used to register these objects.

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 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"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   MXJobSpec        `json:"spec,omitempty"`
	Status common.JobStatus `json:"status,omitempty"`
}

MXJob is the Schema for the mxjobs API

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"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []MXJob `json:"items"`
}

MXJobList contains a list of MXJob

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.
	//+kubebuilder:validation:Optional
	RunPolicy common.RunPolicy `json:"runPolicy"`

	// 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 defines the desired state of 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.

type MXJobStatus

type MXJobStatus struct {
}

MXJobStatus defines the observed state of MXJob

func (*MXJobStatus) DeepCopy

func (in *MXJobStatus) DeepCopy() *MXJobStatus

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

func (*MXJobStatus) DeepCopyInto

func (in *MXJobStatus) DeepCopyInto(out *MXJobStatus)

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