Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the batch v1 API group +kubebuilder:object:generate=true +groupName=batch.paddlepaddle.org
Index ¶
- Constants
- Variables
- type CleanPodPolicy
- type ElasticStatus
- type Intranet
- type PaddleJob
- func (in *PaddleJob) DeepCopy() *PaddleJob
- func (in *PaddleJob) DeepCopyInto(out *PaddleJob)
- func (in *PaddleJob) DeepCopyObject() runtime.Object
- func (pdj *PaddleJob) GetResourceOrder() []string
- func (pdj *PaddleJob) GetSpecs() map[string]*ResourceSpec
- func (pdj *PaddleJob) GetStatuses() map[string]*ResourceStatus
- func (pdj *PaddleJob) SetStatus(resType string, status *ResourceStatus)
- type PaddleJobList
- type PaddleJobMode
- type PaddleJobPhase
- type PaddleJobSpec
- type PaddleJobStatus
- type ResourceSpec
- type ResourceStatus
- type SampleSetRef
- type SchedulingPolicy
Constants ¶
const ( // LABEL KEYS ResourceName = "paddle-res-name" ResourceType = "paddle-res-type" // Annotation KEY ResourceAnnotation = "paddle-resource" )
const ( ResourcePS = "ps" ResourceWorker = "worker" ResourceHeter = "heter" )
const (
KIND = "PaddleJob"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "batch.paddlepaddle.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 )
var TrainingRole = map[string]string{ ResourcePS: "PSERVER", ResourceWorker: "TRAINER", ResourceHeter: "HETER", }
TrainingRole defines the role of node which will be set in environ
Functions ¶
This section is empty.
Types ¶
type CleanPodPolicy ¶
type CleanPodPolicy string
const ( // CleanAlways policy will always clean pods CleanAlways CleanPodPolicy = "Always" // CleanNever policy will nerver clean pods CleanNever CleanPodPolicy = "Never" // CleanOnFailure policy will clean pods only on job failed CleanOnFailure CleanPodPolicy = "OnFailure" // CleanOnCompletion policy will clean pods only on job completed CleanOnCompletion CleanPodPolicy = "OnCompletion" )
type ElasticStatus ¶
type ElasticStatus string
ElasticStatus defines the status of elastic process
const ( ElasticStatusNone ElasticStatus = "NONE" ElasticStatusDoing ElasticStatus = "DOING" ElasticStatusDone ElasticStatus = "DONE" ElasticStatusError ElasticStatus = "ERROR" )
type PaddleJob ¶
type PaddleJob struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec PaddleJobSpec `json:"spec,omitempty"` Status PaddleJobStatus `json:"status,omitempty"` }
PaddleJob is the Schema for the paddlejobs API
func (*PaddleJob) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PaddleJob.
func (*PaddleJob) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PaddleJob) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*PaddleJob) GetResourceOrder ¶
func (*PaddleJob) GetSpecs ¶
func (pdj *PaddleJob) GetSpecs() map[string]*ResourceSpec
func (*PaddleJob) GetStatuses ¶
func (pdj *PaddleJob) GetStatuses() map[string]*ResourceStatus
func (*PaddleJob) SetStatus ¶
func (pdj *PaddleJob) SetStatus(resType string, status *ResourceStatus)
type PaddleJobList ¶
type PaddleJobList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []PaddleJob `json:"items"` }
PaddleJobList contains a list of PaddleJob
func (*PaddleJobList) DeepCopy ¶
func (in *PaddleJobList) DeepCopy() *PaddleJobList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PaddleJobList.
func (*PaddleJobList) DeepCopyInto ¶
func (in *PaddleJobList) DeepCopyInto(out *PaddleJobList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PaddleJobList) DeepCopyObject ¶
func (in *PaddleJobList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PaddleJobMode ¶
type PaddleJobMode string
PaddleJobMode defines the avaiable mode of a job
const ( PaddleJobModePS PaddleJobMode = "PS" PaddleJobModeCollective PaddleJobMode = "Collective" PaddleJobModeSingle PaddleJobMode = "Single" )
type PaddleJobPhase ¶
type PaddleJobPhase string
PaddleJobPhase defines the phase of the job.
const ( Starting PaddleJobPhase = "Starting" Pending PaddleJobPhase = "Pending" Scaling PaddleJobPhase = "Scaling" Aborting PaddleJobPhase = "Aborting" Aborted PaddleJobPhase = "Aborted" Running PaddleJobPhase = "Running" Restarting PaddleJobPhase = "Restarting" Completing PaddleJobPhase = "Completing" Completed PaddleJobPhase = "Completed" Terminating PaddleJobPhase = "Terminating" Terminated PaddleJobPhase = "Terminated" Failed PaddleJobPhase = "Failed" Succeed PaddleJobPhase = "Succeed" Unknown PaddleJobPhase = "Unknown" )
type PaddleJobSpec ¶
type PaddleJobSpec struct { // CleanPodPolicy defines whether to clean pod after job finished CleanPodPolicy CleanPodPolicy `json:"cleanPodPolicy,omitempty"` // SchedulingPolicy defines the policy related to scheduling, for volcano // +optional SchedulingPolicy *SchedulingPolicy `json:"schedulingPolicy,omitempty"` // Intranet defines the communication mode inter pods : PodIP, Service or Host Intranet Intranet `json:"intranet,omitempty"` // WithGloo indicate whether enable gloo, 0/1/2 for disable/enable for worker/enable for server WithGloo *int `json:"withGloo,omitempty"` // SampleSetRef defines the sample data set used for training and its mount path in worker pods // +optional SampleSetRef *SampleSetRef `json:"sampleSetRef,omitempty"` // PS[erver] describes the spec of server base on pod template PS *ResourceSpec `json:"ps,omitempty"` // Worker describes the spec of worker base on pod template Worker *ResourceSpec `json:"worker,omitempty"` // Heter describes the spec of heter worker base on pod temlate Heter *ResourceSpec `json:"heter,omitempty"` // Elastic indicate the elastic level Elastic *int `json:"elastic,omitempty"` }
PaddleJobSpec defines the desired state of PaddleJob
func (*PaddleJobSpec) DeepCopy ¶
func (in *PaddleJobSpec) DeepCopy() *PaddleJobSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PaddleJobSpec.
func (*PaddleJobSpec) DeepCopyInto ¶
func (in *PaddleJobSpec) DeepCopyInto(out *PaddleJobSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PaddleJobStatus ¶
type PaddleJobStatus struct { // The phase of PaddleJob. Phase PaddleJobPhase `json:"phase,omitempty"` // Mode indicates in which the PaddleJob run with : PS/Collective/Single // PS mode is enabled when ps is set // Single/Collective is enabled if ps is missing Mode PaddleJobMode `json:"mode,omitempty"` // ResourceStatues of ps PS *ResourceStatus `json:"ps,omitempty"` // ResourceStatues of worker Worker *ResourceStatus `json:"worker,omitempty"` // ResourceStatues of worker Heter *ResourceStatus `json:"heter,omitempty"` // Elastic Elastic *ElasticStatus `json:"elastic,omitempty"` // StartTime indicate when the job started StartTime *metav1.Time `json:"startTime,omitempty"` // CompletionTime indicate when the job completed/failed CompletionTime *metav1.Time `json:"completionTime,omitempty"` ObservedGeneration int `json:"observedGeneration,omitempty"` }
PaddleJobStatus defines the observed state of PaddleJob
func (*PaddleJobStatus) DeepCopy ¶
func (in *PaddleJobStatus) DeepCopy() *PaddleJobStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PaddleJobStatus.
func (*PaddleJobStatus) DeepCopyInto ¶
func (in *PaddleJobStatus) DeepCopyInto(out *PaddleJobStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceSpec ¶
type ResourceSpec struct { // Replicas replica Replicas int `json:"replicas"` // Requests set the minimal replicas of server to be run Requests *int `json:"requests,omitempty"` // Requests set the maximal replicas of server to be run, elastic is auto enbale if limits is set larger than 0 Limits *int `json:"limits,omitempty"` // Template specifies the podspec of a server Template corev1.PodTemplateSpec `json:"template,omitempty"` }
func (*ResourceSpec) DeepCopy ¶
func (in *ResourceSpec) DeepCopy() *ResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.
func (*ResourceSpec) DeepCopyInto ¶
func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceStatus ¶
type ResourceStatus struct { // Pending Pending int `json:"pending,omitempty"` // Starting Starting int `json:"starting,omitempty"` // Running Running int `json:"running,omitempty"` // Failed Failed int `json:"failed,omitempty"` // Success Succeeded int `json:"succeeded,omitempty"` // Unknown Unknown int `json:"unknown,omitempty"` // A list of pointer to pods Refs []corev1.ObjectReference `json:"refs,omitempty"` }
func (*ResourceStatus) DeepCopy ¶
func (in *ResourceStatus) DeepCopy() *ResourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceStatus.
func (*ResourceStatus) DeepCopyInto ¶
func (in *ResourceStatus) DeepCopyInto(out *ResourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SampleSetRef ¶
type SampleSetRef struct { // Name of the SampleSet. // +kubebuilder:validation:Required Name string `json:"name,omitempty"` // Namespace of the SampleSet. // +optional Namespace string `json:"namespace,omitempty"` // Path within the container at which the volume should be mounted. Must not contain ':'. // +kubebuilder:validation:Required MountPath string `json:"mountPath"` }
func (*SampleSetRef) DeepCopy ¶
func (in *SampleSetRef) DeepCopy() *SampleSetRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SampleSetRef.
func (*SampleSetRef) DeepCopyInto ¶
func (in *SampleSetRef) DeepCopyInto(out *SampleSetRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SchedulingPolicy ¶
type SchedulingPolicy struct { MinAvailable *int32 `json:"minAvailable,omitempty"` Queue string `json:"queue,omitempty"` PriorityClass string `json:"priorityClass,omitempty"` // pointer may cause deepcopy error // api/v1/zz_generated.deepcopy.go:230:8: cannot use new(map["k8s.io/api/core/v1".ResourceName]resource.Quantity) (type *map["k8s.io/api/core/v1".ResourceName]resource.Quantity) as type *"k8s.io/api/core/v1".ResourceList in assignment MinResources corev1.ResourceList `json:"minResources,omitempty"` }
SchedulingPolicy embed schedule policy of volcano
func (*SchedulingPolicy) DeepCopy ¶
func (in *SchedulingPolicy) DeepCopy() *SchedulingPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulingPolicy.
func (*SchedulingPolicy) DeepCopyInto ¶
func (in *SchedulingPolicy) DeepCopyInto(out *SchedulingPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.