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
- Variables
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- 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
Constants ¶
const ( // 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 // Kind is the kind name. Kind = "PyTorchJob" // Plural is the Plural for pytorchJob. Plural = "pytorchjobs" // Singular is the singular for pytorchJob. Singular = "pytorchjob" // FrameworkName is the name of the ML Framework FrameworkName = "pytorch" )
const ( // PyTorchReplicaTypeMaster is the type of Master of distributed PyTorch PyTorchReplicaTypeMaster common.ReplicaType = "Master" // PyTorchReplicaTypeWorker is the type for workers of distributed PyTorch. PyTorchReplicaTypeWorker common.ReplicaType = "Worker" )
Variables ¶
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 )
var SchemeGroupVersion = GroupVersion
SchemeGroupVersion is group version used to register these objects.
Functions ¶
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
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 { // Standard Kubernetes type metadata. metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of the desired state of the PyTorchJob. Spec PyTorchJobSpec `json:"spec,omitempty"` // Most recently observed status of the PyTorchJob. // Read-only (modified by the system). Status common.JobStatus `json:"status,omitempty"` }
PyTorchJob Represents a PyTorchJob resource.
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 { // Standard type metadata. 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 { // 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"` // A map of PyTorchReplicaType (type) to ReplicaSpec (value). Specifies the PyTorch cluster configuration. // For example, // { // "Master": PyTorchReplicaSpec, // "Worker": PyTorchReplicaSpec, // } PyTorchReplicaSpecs map[common.ReplicaType]*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.