Documentation
¶
Overview ¶
Package v1 is the v1 version of the API. +groupName=kubeflow.org
Index ¶
- Constants
- Variables
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- func Int32(v int32) *int32
- func IsChieforMaster(typ commonv1.ReplicaType) bool
- func IsEvaluator(typ commonv1.ReplicaType) bool
- func IsWorker(typ commonv1.ReplicaType) bool
- func RegisterDefaults(scheme *runtime.Scheme) error
- func Resource(resource string) schema.GroupResource
- func SetDefaults_TFJob(tfjob *TFJob)
- func SetObjectDefaults_TFJob(in *TFJob)
- func SetObjectDefaults_TFJobList(in *TFJobList)
- type SuccessPolicy
- type TFJob
- type TFJobList
- type TFJobSpec
Constants ¶
const ( // EnvKubeflowNamespace is ENV for kubeflow namespace specified by user. EnvKubeflowNamespace = "KUBEFLOW_NAMESPACE" // DefaultPortName is name of the port used to communicate between PS and // workers. DefaultPortName = "tfjob-port" // DefaultContainerName is the name of the TFJob container. DefaultContainerName = "tensorflow" // DefaultPort is default value of the port. DefaultPort = 2222 // DefaultRestartPolicy is default RestartPolicy for TFReplicaSpec. DefaultRestartPolicy = common.RestartPolicyNever )
const ( // GroupName is the group name use in this package. GroupName = "kubeflow.org" // Kind is the kind name. Kind = "TFJob" // GroupVersion is the version. GroupVersion = "v1" // Plural is the Plural for TFJob. Plural = "tfjobs" // Singular is the singular for TFJob. Singular = "tfjob" // TFCRD is the CRD name for TFJob. TFCRD = "tfjobs.kubeflow.org" )
const ( // TFReplicaTypePS is the type for parameter servers of distributed TensorFlow. TFReplicaTypePS commonv1.ReplicaType = "PS" // TFReplicaTypeWorker is the type for workers of distributed TensorFlow. // This is also used for non-distributed TensorFlow. TFReplicaTypeWorker commonv1.ReplicaType = "Worker" // TFReplicaTypeChief is the type for chief worker of distributed TensorFlow. // If there is "chief" replica type, it's the "chief worker". // Else, worker:0 is the chief worker. TFReplicaTypeChief commonv1.ReplicaType = "Chief" // TFReplicaTypeMaster is the type for master worker of distributed TensorFlow. // This is similar to chief, and kept just for backwards compatibility. TFReplicaTypeMaster commonv1.ReplicaType = "Master" // TFReplicaTypeEval is the type for evaluation replica in TensorFlow. TFReplicaTypeEval commonv1.ReplicaType = "Evaluator" )
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 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 IsChieforMaster ¶
func IsChieforMaster(typ commonv1.ReplicaType) bool
IsChieforMaster returns true if the type is Master or Chief.
func IsEvaluator ¶
func IsEvaluator(typ commonv1.ReplicaType) bool
IsEvaluator returns true if the type is Evaluator.
func IsWorker ¶
func IsWorker(typ commonv1.ReplicaType) bool
IsWorker returns true if the type is Worker.
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_TFJob ¶
func SetDefaults_TFJob(tfjob *TFJob)
SetDefaults_TFJob sets any unspecified values to defaults.
func SetObjectDefaults_TFJob ¶
func SetObjectDefaults_TFJob(in *TFJob)
func SetObjectDefaults_TFJobList ¶
func SetObjectDefaults_TFJobList(in *TFJobList)
Types ¶
type SuccessPolicy ¶ added in v1.1.0
type SuccessPolicy string
SuccessPolicy is the success policy.
const ( SuccessPolicyDefault SuccessPolicy = "" SuccessPolicyAllWorkers SuccessPolicy = "AllWorkers" )
type TFJob ¶
type TFJob struct { // Standard Kubernetes type metadata. metav1.TypeMeta `json:",inline"` // Standard Kubernetes object's metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of the desired state of the TFJob. // +optional Spec TFJobSpec `json:"spec,omitempty"` // Most recently observed status of the TFJob. // Populated by the system. // Read-only. // +optional Status commonv1.JobStatus `json:"status,omitempty"` }
TFJob represents a TFJob resource.
func (*TFJob) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TFJob.
func (*TFJob) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TFJob) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TFJobList ¶
type TFJobList struct { // Standard type metadata. metav1.TypeMeta `json:",inline"` // Standard list metadata. // +optional metav1.ListMeta `json:"metadata,omitempty"` // List of TFJobs. Items []TFJob `json:"items"` }
TFJobList is a list of TFJobs.
func (*TFJobList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TFJobList.
func (*TFJobList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TFJobList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TFJobSpec ¶
type TFJobSpec 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 commonv1.RunPolicy `json:"runPolicy,inline"` // SuccessPolicy defines the policy to mark the TFJob as succeeded. // Default to "", using the default rules. // +optional SuccessPolicy *SuccessPolicy `json:"successPolicy,omitempty"` // A map of TFReplicaType (type) to ReplicaSpec (value). Specifies the TF cluster configuration. // For example, // { // "PS": ReplicaSpec, // "Worker": ReplicaSpec, // } TFReplicaSpecs map[commonv1.ReplicaType]*commonv1.ReplicaSpec `json:"tfReplicaSpecs"` // A switch to enable dynamic worker EnableDynamicWorker bool `json:"enableDynamicWorker,omitempty"` }
TFJobSpec is a desired state description of the TFJob.
func (*TFJobSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TFJobSpec.
func (*TFJobSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.