v1alpha1

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the inference v1alpha1 API group +kubebuilder:object:generate=true +groupName=inference.kubedl.io

Index

Constants

View Source
const (
	ElasticBatchJobKind = "ElasticBatchJob"
	// ElasticBatchJobDefaultContainerName is the name of the ElasticBatchJob container.
	ElasticBatchJobDefaultContainerName = "elasticbatch"
	// ElasticBatchJobDefaultPortName is name of the port used to communicate between AIMaster and
	// workers.
	ElasticBatchJobDefaultPortName = "elstcbatch-port"
	// ElasticBatchJobDefaultPort is default value of the port.
	ElasticBatchJobDefaultPort = 23456
	// ElasticBatchJobDefaultMasterRestartPolicy is default RestartPolicy for Master ElasticBatchReplicaSpec.
	ElasticBatchJobDefaultAIMasterRestartPolicy = common.RestartPolicyNever
	// ElasticBatchJobDefaultWorkerRestartPolicy is default RestartPolicy for Worker ElasticBatchReplicaSpec,
	ElasticBatchJobDefaultWorkerRestartPolicy = common.RestartPolicyExitCode
)
View Source
const (
	// ElasticBatchReplicaTypeAIMaster is the type of AIMaster of distributed ElasticBatchJob
	ElasticBatchReplicaTypeAIMaster common.ReplicaType = common.JobReplicaTypeAIMaster

	// ElasticBatchReplicaTypeWorker is the type for workers of distributed ElasticBatchJob.
	ElasticBatchReplicaTypeWorker common.ReplicaType = "Worker"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "inference.kubedl.io", 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

func EnableFallbackToLogsOnErrorTerminationMessagePolicy

func EnableFallbackToLogsOnErrorTerminationMessagePolicy(podSpec *corev1.PodSpec)

func Int32

func Int32(v int32) *int32

Int32 is a helper routine that allocates a new int32 value to store v and returns a pointer to it.

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

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_ElasticBatchJob

func SetDefaults_ElasticBatchJob(job *ElasticBatchJob)

SetDefaults_ElasticBatchJob sets any unspecified values to defaults.

func SetObjectDefaults_ElasticBatchJob

func SetObjectDefaults_ElasticBatchJob(in *ElasticBatchJob)

func SetObjectDefaults_ElasticBatchJobList

func SetObjectDefaults_ElasticBatchJobList(in *ElasticBatchJobList)

Types

type ElasticBatchJob

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

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

Represents a ElasticBatchJob resource.

func (*ElasticBatchJob) DeepCopy

func (in *ElasticBatchJob) DeepCopy() *ElasticBatchJob

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

func (*ElasticBatchJob) DeepCopyInto

func (in *ElasticBatchJob) DeepCopyInto(out *ElasticBatchJob)

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

func (*ElasticBatchJob) DeepCopyObject

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

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

type ElasticBatchJobList

type ElasticBatchJobList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ElasticBatchJob `json:"items"`
}

func (*ElasticBatchJobList) DeepCopy

func (in *ElasticBatchJobList) DeepCopy() *ElasticBatchJobList

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

func (*ElasticBatchJobList) DeepCopyInto

func (in *ElasticBatchJobList) DeepCopyInto(out *ElasticBatchJobList)

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

func (*ElasticBatchJobList) DeepCopyObject

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

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

type ElasticBatchJobSpec

type ElasticBatchJobSpec 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.
	common.RunPolicy `json:",inline"`

	// SuccessPolicy defines the policy to mark the ElasticBatchJob as succeeded when the job contains master role.
	// Value "" means the default policy that the job is succeeded if all workers are succeeded or master completed,
	// Value "AllWorkers" means the job is succeeded if all workers *AND* master are succeeded.
	// Default to ""
	// +optional
	SuccessPolicy *common.SuccessPolicy `json:"successPolicy,omitempty"`

	// A map of ElasticBatchReplicaType (type) to ReplicaSpec (value). Specifies the ElasticBatchJob cluster configuration.
	// For example,
	//   {
	//      "AIMaster": ReplicaSpec,
	//      "Worker": ReplicaSpec,
	//   }
	ElasticBatchReplicaSpecs map[common.ReplicaType]*common.ReplicaSpec `json:"elasticBatchReplicaSpecs"`
}

ElasticBatchJobSpec defines the desired state of ElasticBatchJob

func (*ElasticBatchJobSpec) DeepCopy

func (in *ElasticBatchJobSpec) DeepCopy() *ElasticBatchJobSpec

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

func (*ElasticBatchJobSpec) DeepCopyInto

func (in *ElasticBatchJobSpec) DeepCopyInto(out *ElasticBatchJobSpec)

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