Documentation ¶
Index ¶
- Constants
- Variables
- func CheckCondition(job *pyv1.PyTorchJob, condition common.JobConditionType, reason string) bool
- func ConvertPyTorchJobToUnstructured(job *pyv1.PyTorchJob) (*unstructured.Unstructured, error)
- func GenLabels(jobName string) map[string]string
- func GenOwnerReference(job *pyv1.PyTorchJob) *metav1.OwnerReference
- func GetKey(job *pyv1.PyTorchJob, t *testing.T) string
- func NewBasePod(name string, job *pyv1.PyTorchJob, t *testing.T) *v1.Pod
- func NewBaseService(name string, job *pyv1.PyTorchJob, t *testing.T) *v1.Service
- func NewPod(job *pyv1.PyTorchJob, typ string, index int, t *testing.T) *v1.Pod
- func NewPodList(count int32, status v1.PodPhase, job *pyv1.PyTorchJob, typ string, start int32, ...) []*v1.Pod
- func NewPyTorchJob(worker int) *pyv1.PyTorchJob
- func NewPyTorchJobWithActiveDeadlineSeconds(master, worker int, ads *int64) *pyv1.PyTorchJob
- func NewPyTorchJobWithBackoffLimit(master, worker int, backoffLimit *int32) *pyv1.PyTorchJob
- func NewPyTorchJobWithCleanPolicy(master, worker int, policy common.CleanPodPolicy) *pyv1.PyTorchJob
- func NewPyTorchJobWithCleanupJobDelay(master, worker int, ttl *int32) *pyv1.PyTorchJob
- func NewPyTorchJobWithMaster(worker int) *pyv1.PyTorchJob
- func NewPyTorchReplicaSpecTemplate() v1.PodTemplateSpec
- func NewService(job *pyv1.PyTorchJob, typ string, index int, t *testing.T) *v1.Service
- func NewServiceList(count int32, job *pyv1.PyTorchJob, typ string, t *testing.T) []*v1.Service
- func SetPodsStatuses(podIndexer cache.Indexer, job *pyv1.PyTorchJob, typ string, ...)
- func SetPyTorchJobCompletionTime(job *pyv1.PyTorchJob)
- func SetServices(serviceIndexer cache.Indexer, job *pyv1.PyTorchJob, typ string, ...)
Constants ¶
View Source
const ( TestImageName = "test-image-for-kubeflow-pytorch-operator:latest" TestPyTorchJobName = "test-pytorchjob" LabelWorker = "worker" LabelMaster = "master" SleepInterval = 500 * time.Millisecond ThreadCount = 1 )
View Source
const ( LabelGroupName = "group-name" LabelPyTorchJobName = "pytorch-job-name" )
Variables ¶
View Source
var ( // KeyFunc is the short name to DeletionHandlingMetaNamespaceKeyFunc. // IndexerInformer uses a delta queue, therefore for deletes we have to use this // key function but it should be just fine for non delete events. KeyFunc = cache.DeletionHandlingMetaNamespaceKeyFunc GroupName = pyv1.GroupName )
View Source
var (
AlwaysReady = func() bool { return true }
)
Functions ¶
func CheckCondition ¶
func CheckCondition(job *pyv1.PyTorchJob, condition common.JobConditionType, reason string) bool
func ConvertPyTorchJobToUnstructured ¶
func ConvertPyTorchJobToUnstructured(job *pyv1.PyTorchJob) (*unstructured.Unstructured, error)
ConvertPyTorchJobToUnstructured uses JSON to convert PyTorchJob to Unstructured.
func GenOwnerReference ¶
func GenOwnerReference(job *pyv1.PyTorchJob) *metav1.OwnerReference
func NewBasePod ¶
func NewBaseService ¶
func NewPodList ¶
func NewPodList(count int32, status v1.PodPhase, job *pyv1.PyTorchJob, typ string, start int32, t *testing.T) []*v1.Pod
create count pods with the given phase for the given job
func NewPyTorchJob ¶
func NewPyTorchJob(worker int) *pyv1.PyTorchJob
func NewPyTorchJobWithActiveDeadlineSeconds ¶
func NewPyTorchJobWithActiveDeadlineSeconds(master, worker int, ads *int64) *pyv1.PyTorchJob
func NewPyTorchJobWithBackoffLimit ¶
func NewPyTorchJobWithBackoffLimit(master, worker int, backoffLimit *int32) *pyv1.PyTorchJob
func NewPyTorchJobWithCleanPolicy ¶
func NewPyTorchJobWithCleanPolicy(master, worker int, policy common.CleanPodPolicy) *pyv1.PyTorchJob
func NewPyTorchJobWithCleanupJobDelay ¶
func NewPyTorchJobWithCleanupJobDelay(master, worker int, ttl *int32) *pyv1.PyTorchJob
func NewPyTorchJobWithMaster ¶
func NewPyTorchJobWithMaster(worker int) *pyv1.PyTorchJob
func NewPyTorchReplicaSpecTemplate ¶
func NewPyTorchReplicaSpecTemplate() v1.PodTemplateSpec
func NewService ¶
func NewServiceList ¶
NewServiceList creates count pods with the given phase for the given job
func SetPodsStatuses ¶
func SetPyTorchJobCompletionTime ¶
func SetPyTorchJobCompletionTime(job *pyv1.PyTorchJob)
func SetServices ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.