kubeflowjob

package
v0.10.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMKAdapter added in v0.9.0

func NewMKAdapter[PtrT objAsPtr[T], T any](
	copySpec func(dst, src PtrT),
	copyStatus func(dst, src PtrT),
	emptyList func() client.ObjectList,
	gvk schema.GroupVersionKind,
) fullInterface

Types

type KFJobControl

type KFJobControl interface {
	// Object returns the KFJob interface.
	Object() client.Object
	// GVK returns the GroupVersionKind for the KFJob.
	GVK() schema.GroupVersionKind
	// RunPolicy returns the RunPolicy for the KFJob.
	RunPolicy() *kftraining.RunPolicy
	// ReplicaSpecs returns the ReplicaSpecs for the KFJob.
	ReplicaSpecs() map[kftraining.ReplicaType]*kftraining.ReplicaSpec
	// ReplicaSpecsFieldName returns the field name of the ReplicaSpecs.
	ReplicaSpecsFieldName() string
	// JobStatus returns the JobStatus for the KFJob.
	JobStatus() *kftraining.JobStatus
	// OrderedReplicaTypes returns the ordered list of ReplicaTypes for the KFJob.
	OrderedReplicaTypes() []kftraining.ReplicaType
}

type KubeflowJob

type KubeflowJob struct {
	KFJobControl KFJobControl
}

func (*KubeflowJob) Finished

func (j *KubeflowJob) Finished() (message string, success, finished bool)

func (*KubeflowJob) GVK

func (*KubeflowJob) IsActive

func (j *KubeflowJob) IsActive() bool

func (*KubeflowJob) IsSuspended

func (j *KubeflowJob) IsSuspended() bool

func (*KubeflowJob) Object

func (j *KubeflowJob) Object() client.Object

func (*KubeflowJob) OrderedReplicaTypes

func (j *KubeflowJob) OrderedReplicaTypes() []kftraining.ReplicaType

func (*KubeflowJob) PodLabelSelector added in v0.9.0

func (j *KubeflowJob) PodLabelSelector() string

func (*KubeflowJob) PodSets

func (j *KubeflowJob) PodSets() []kueue.PodSet

func (*KubeflowJob) PodsReady

func (j *KubeflowJob) PodsReady() bool

func (*KubeflowJob) PriorityClass

func (j *KubeflowJob) PriorityClass() string

PriorityClass calculates the priorityClass name needed for workload according to the following priorities:

  1. .spec.runPolicy.schedulingPolicy.priorityClass
  2. .spec.replicaSpecs[OrderedReplicaTypes[0]].template.spec.priorityClassName
  3. .spec.replicaSpecs[OrderedReplicaTypes[1]].template.spec.priorityClassName
  4. ...

This function is inspired by an analogous one in mpi-controller: https://github.com/kubeflow/mpi-operator/blob/5946ef4157599a474ab82ff80e780d5c2546c9ee/pkg/controller/podgroup.go#L69-L72

func (*KubeflowJob) RestorePodSetsInfo

func (j *KubeflowJob) RestorePodSetsInfo(podSetsInfo []podset.PodSetInfo) bool

func (*KubeflowJob) RunWithPodSetsInfo

func (j *KubeflowJob) RunWithPodSetsInfo(podSetsInfo []podset.PodSetInfo) error

func (*KubeflowJob) Suspend

func (j *KubeflowJob) Suspend()

func (*KubeflowJob) ValidateOnCreate added in v0.9.0

func (j *KubeflowJob) ValidateOnCreate() field.ErrorList

func (*KubeflowJob) ValidateOnUpdate added in v0.9.0

func (j *KubeflowJob) ValidateOnUpdate(_ jobframework.GenericJob) field.ErrorList

Jump to

Keyboard shortcuts

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