v1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1 is the v1 version of the API. +groupName=kubeflow.org

Index

Constants

View Source
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
	// DefaultMasterRestartPolicy is default RestartPolicy for Master PyTorchReplicaSpec.
	DefaultMasterRestartPolicy = common.RestartPolicyExitCode
	// DefaultWorkerRestartPolicy is default RestartPolicy for Worker PyTorchReplicaSpec,
	DefaultWorkerRestartPolicy = common.RestartPolicyOnFailure
)
View Source
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 = "v1"
	// 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"
)
View Source
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

View Source
var (
	// SchemeGroupVersion is the group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: GroupVersion}

	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
	// SchemeGroupVersionKind is the GroupVersionKind of the resource.
	SchemeGroupVersionKind = SchemeGroupVersion.WithKind(Kind)
)

Functions

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_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"`

	// Standard Kubernetes object's metadata.
	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"`
}

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL