jobset

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// VolumeNameInitializer is the name for the initializer Pod's Volume and VolumeMount.
	// TODO (andreyvelich): Add validation to check that initializer Pod has the correct volume.
	VolumeNameInitializer string = "initializer"

	// InitializerEnvStorageUri is the env name for the initializer storage uri.
	InitializerEnvStorageUri string = "STORAGE_URI"
)

Variables

View Source
var (
	// This is the temporary container that we use in the initializer ReplicatedJob.
	// TODO (andreyvelich): Once JobSet supports execution policy, we can remove it.
	ContainerBusyBox corev1.Container = corev1.Container{
		Name:  "busybox",
		Image: "busybox:stable-glibc",
	}

	// VolumeMountModelInitializer is the volume mount for the model initializer container.
	// TODO (andreyvelich): Add validation to check that initializer ReplicatedJob has the following volumes.
	VolumeMountModelInitializer = corev1.VolumeMount{
		Name:      VolumeNameInitializer,
		MountPath: "/workspace/model",
	}

	// VolumeMountModelInitializer is the volume mount for the dataset initializer container.
	VolumeMountDatasetInitializer = corev1.VolumeMount{
		Name:      VolumeNameInitializer,
		MountPath: "/workspace/dataset",
	}

	// VolumeInitializer is the volume for the initializer ReplicatedJob.
	// TODO (andreyvelich): We should make VolumeSource configurable.
	VolumeInitializer = corev1.Volume{
		Name: VolumeNameInitializer,
		VolumeSource: corev1.VolumeSource{
			PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{
				ClaimName: VolumeNameInitializer,
			},
		},
	}
)

Functions

Types

type Builder

type Builder struct {
	jobsetv1alpha2.JobSet
}

func NewBuilder

func NewBuilder(objectKey client.ObjectKey, jobSetTemplateSpec kubeflowv2.JobSetTemplateSpec) *Builder

func (*Builder) Build

func (b *Builder) Build() *jobsetv1alpha2.JobSet

func (*Builder) Initializer

func (b *Builder) Initializer(trainJob *kubeflowv2.TrainJob) *Builder

Initializer updates JobSet values for the initializer Job.

func (*Builder) PodLabels

func (b *Builder) PodLabels(labels map[string]string) *Builder

TODO: Supporting merge labels would be great.

func (*Builder) Suspend

func (b *Builder) Suspend(suspend *bool) *Builder

func (*Builder) Trainer

func (b *Builder) Trainer(info *runtime.Info, trainJob *kubeflowv2.TrainJob) *Builder

Trainer updates JobSet values for the trainer Job.

type JobSet

type JobSet struct {
	// contains filtered or unexported fields
}

func (*JobSet) Build

func (j *JobSet) Build(ctx context.Context, runtimeJobTemplate client.Object, info *runtime.Info, trainJob *kubeflowv2.TrainJob) (client.Object, error)

func (*JobSet) Name

func (j *JobSet) Name() string

func (*JobSet) ReconcilerBuilders

func (j *JobSet) ReconcilerBuilders() []runtime.ReconcilerBuilder

func (*JobSet) TerminalCondition

func (j *JobSet) TerminalCondition(ctx context.Context, trainJob *kubeflowv2.TrainJob) (*metav1.Condition, error)

Jump to

Keyboard shortcuts

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