kubeflowjob

package
v0.6.0-rc.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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
	// 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() (metav1.Condition, 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) 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()

Jump to

Keyboard shortcuts

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