Documentation ¶
Overview ¶
Package v1beta2 is the v1beta2 version of the API. +groupName=kubeflow.org
Index ¶
- Constants
- Variables
- func Int32(v int32) *int32
- func RegisterDefaults(scheme *runtime.Scheme) error
- func Resource(resource string) schema.GroupResource
- func SetDefaults_PyTorchJob(job *PyTorchJob)
- func SetObjectDefaults_PyTorchJob(in *PyTorchJob)
- func SetObjectDefaults_PyTorchJobList(in *PyTorchJobList)
- type PyTorchJob
- type PyTorchJobList
- type PyTorchJobSpec
- type PyTorchReplicaType
Constants ¶
const ( // EnvKubeflowNamespace is ENV for kubeflow namespace specified by user. EnvKubeflowNamespace = "KUBEFLOW_NAMESPACE" // DefaultPortName is name of the port used to communicate between Master and // workers. DefaultPortName = "pytorchjob-port" // DefaultContainerName is the name of the PyTorchJob container. DefaultContainerName = "pytorch" // DefaultPort is default value of the port. DefaultPort = 23456 // DefaultRestartPolicy is default RestartPolicy for PyTorchReplicaSpec. DefaultRestartPolicy = common.RestartPolicyOnFailure )
const ( // GroupName is the group name use in this package. GroupName = "kubeflow.org" // Kind is the kind name. Kind = "PyTorchJob" // GroupVersion is the version. GroupVersion = "v1beta2" // Plural is the Plural for pytorchJob. Plural = "pytorchjobs" // Singular is the singular for pytorchJob. Singular = "pytorchjob" // PytorchCRD is the CRD name for PytorchJob. PytorchCRD = "pytorchjobs.kubeflow.org" )
Variables ¶
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 )
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 ¶
Int32 is a helper routine that allocates a new int32 value to store v and returns a pointer to it.
func RegisterDefaults ¶
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_PyTorchJob ¶
func SetDefaults_PyTorchJob(job *PyTorchJob)
SetDefaults_PyTorchJob sets any unspecified values to defaults.
func SetObjectDefaults_PyTorchJob ¶
func SetObjectDefaults_PyTorchJob(in *PyTorchJob)
func SetObjectDefaults_PyTorchJobList ¶
func SetObjectDefaults_PyTorchJobList(in *PyTorchJobList)
Types ¶
type PyTorchJob ¶
type PyTorchJob struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of the desired behavior of the PyTorchJob. Spec PyTorchJobSpec `json:"spec,omitempty"` // Most recently observed status of the PyTorchJob. // This data may not be up to date. // Populated by the system. // Read-only. Status common.JobStatus `json:"status,omitempty"` }
PyTorchJob represents the configuration of PyTorchJob
func (*PyTorchJob) DeepCopy ¶
func (in *PyTorchJob) DeepCopy() *PyTorchJob
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PyTorchJob.
func (*PyTorchJob) DeepCopyInto ¶
func (in *PyTorchJob) DeepCopyInto(out *PyTorchJob)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PyTorchJob) DeepCopyObject ¶
func (in *PyTorchJob) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PyTorchJobList ¶
type PyTorchJobList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. metav1.ListMeta `json:"metadata,omitempty"` // List of PyTorchJobs. Items []PyTorchJob `json:"items"` }
PyTorchJobList is a list of PyTorchJobs.
func (*PyTorchJobList) DeepCopy ¶
func (in *PyTorchJobList) DeepCopy() *PyTorchJobList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PyTorchJobList.
func (*PyTorchJobList) DeepCopyInto ¶
func (in *PyTorchJobList) DeepCopyInto(out *PyTorchJobList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PyTorchJobList) DeepCopyObject ¶
func (in *PyTorchJobList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PyTorchJobSpec ¶
type PyTorchJobSpec struct { // Specifies the duration in seconds relative to the startTime that the job may be active // before the system tries to terminate it; value must be positive integer. // This method applies only to pods with restartPolicy == OnFailure or Always. // +optional ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` // Optional number of retries before marking this job failed. // +optional BackoffLimit *int32 `json:"backoffLimit,omitempty"` // CleanPodPolicy defines the policy to kill pods after PyTorchJob is // succeeded. // Default to Running. CleanPodPolicy *common.CleanPodPolicy `json:"cleanPodPolicy,omitempty"` // TTLSecondsAfterFinished is the TTL to clean up pytorch-jobs (temporary // before kubernetes adds the cleanup controller). // It may take extra ReconcilePeriod seconds for the cleanup, since // reconcile gets called periodically. // Default to infinite. TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"` // PyTorchReplicaSpecs is map of PyTorchReplicaType and PyTorchReplicaSpec // specifies the PyTorch replicas to run. // For example, // { // "Master": PyTorchReplicaSpec, // "Worker": PyTorchReplicaSpec, // } PyTorchReplicaSpecs map[PyTorchReplicaType]*common.ReplicaSpec `json:"pytorchReplicaSpecs"` }
PyTorchJobSpec is a desired state description of the PyTorchJob.
func (*PyTorchJobSpec) DeepCopy ¶
func (in *PyTorchJobSpec) DeepCopy() *PyTorchJobSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PyTorchJobSpec.
func (*PyTorchJobSpec) DeepCopyInto ¶
func (in *PyTorchJobSpec) DeepCopyInto(out *PyTorchJobSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PyTorchReplicaType ¶
type PyTorchReplicaType common.ReplicaType
PyTorchReplicaType is the type for PyTorchReplica.
const ( // PyTorchReplicaTypeMaster is the type of Master of distributed PyTorch PyTorchReplicaTypeMaster PyTorchReplicaType = "Master" // PyTorchReplicaTypeWorker is the type for workers of distributed PyTorch. PyTorchReplicaTypeWorker PyTorchReplicaType = "Worker" )