v1alpha1

package
v0.0.0-...-05758ac Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the training v1alpha1 API group +kubebuilder:object:generate=true +groupName=training.pai.ai

Index

Constants

View Source
const (
	// Kind is the kind name.
	Kind = "TFJob"
	// Plural is the Plural for TFJob.
	Plural = "tfjobs"
	// Singular is the singular for TFJob.
	Singular = "tfjob"
)
View Source
const (
	// TFJobDefaultPortName is name of the port used to communicate between PS and
	// workers.
	TFJobDefaultPortName = "tfjob-port"
	// TFJobDefaultContainerName is the name of the TFJob container.
	TFJobDefaultContainerName = "tensorflow"
	// TFJobDefaultPort is default value of the port.
	TFJobDefaultPort = 2222
	// TFJobDefaultRestartPolicy is default RestartPolicy for TFReplicaSpec.
	TFJobDefaultRestartPolicy = commonv1.RestartPolicyNever
	// TFJobKind is the kind name.
	TFJobKind = "TFJob"
	// TFJobPlural is the TensorflowPlural for TFJob.
	TFJObPlural = "tfjobs"
	// TFJobSingular is the singular for TFJob.
	TFJobSingular = "tfjob"
	// TFJobFrameworkName is the name of the ML Framework
	TFJobFrameworkName = "tensorflow"
)
View Source
const (
	// TFJobReplicaTypePS is the type for parameter servers of distributed TensorFlow.
	TFJobReplicaTypePS commonv1.ReplicaType = "PS"

	// TFJobReplicaTypeWorker is the type for workers of distributed TensorFlow.
	// This is also used for non-distributed TensorFlow.
	TFJobReplicaTypeWorker commonv1.ReplicaType = "Worker"

	// TFJobReplicaTypeChief 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.
	TFJobReplicaTypeChief commonv1.ReplicaType = "Chief"

	// TFJobReplicaTypeMaster is the type for master worker of distributed TensorFlow.
	// This is similar to chief, and kept just for backwards compatibility.
	TFJobReplicaTypeMaster commonv1.ReplicaType = "Master"

	// TFJobReplicaTypeEval is the type for evaluation replica in TensorFlow.
	TFJobReplicaTypeEval commonv1.ReplicaType = "Evaluator"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "training.pai.ai", Version: "v1alpha1"}

	// 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
)

Functions

This section is empty.

Types

type SuccessPolicy

type SuccessPolicy string

SuccessPolicy is the success policy.

const (
	SuccessPolicyDefault    SuccessPolicy = ""
	SuccessPolicyAllWorkers SuccessPolicy = "AllWorkers"
)

type TFJob

type TFJob struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

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

PyTorchJob is the Schema for the pytorchjobs API

func (*TFJob) DeepCopy

func (in *TFJob) DeepCopy() *TFJob

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

func (*TFJob) DeepCopyInto

func (in *TFJob) DeepCopyInto(out *TFJob)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TFJob) DeepCopyObject

func (in *TFJob) DeepCopyObject() runtime.Object

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

func (in *TFJobList) DeepCopy() *TFJobList

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

func (*TFJobList) DeepCopyInto

func (in *TFJobList) DeepCopyInto(out *TFJobList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TFJobList) DeepCopyObject

func (in *TFJobList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TFJobSpec

type TFJobSpec struct {
	tensorflowv1.TFJobSpec `json:",inline"` // Embed tensorflowv1.TFJobSpec inline

	// AIMasterSpec specifies AIMaster configurations.
	//+kubebuilder:validation:Optional
	AIMasterSpec common.AIMasterSpec `json:"aimasterSpec,omitempty"`
}

TFJobSpec is a desired state description of the TFJob.

func (*TFJobSpec) DeepCopy

func (in *TFJobSpec) DeepCopy() *TFJobSpec

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

func (*TFJobSpec) DeepCopyInto

func (in *TFJobSpec) DeepCopyInto(out *TFJobSpec)

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