worker

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SelectWorker

func SelectWorker(
	ctx context.Context,
	k8sClient client.Client,
	workload *tfv1.TensorFusionWorkload,
	maxSkew int32,
) (*tfv1.WorkerStatus, error)

Types

type WorkerGenerator

type WorkerGenerator struct {
	GpuInfos     *[]config.GpuInfo
	WorkerConfig *tfv1.WorkerConfig
}

func (*WorkerGenerator) AllocPort

func (wg *WorkerGenerator) AllocPort() int

func (*WorkerGenerator) GenerateWorkerPod

func (wg *WorkerGenerator) GenerateWorkerPod(
	gpus []*tfv1.GPU,
	generateName string,
	namespace string,
	port int,
	limits tfv1.Resource,
	podTemplateHash string,
) (*corev1.Pod, string, error)

func (*WorkerGenerator) PodTemplateHash added in v1.23.0

func (wg *WorkerGenerator) PodTemplateHash(workloadSpec any) (string, error)

func (*WorkerGenerator) WorkerPort

func (wg *WorkerGenerator) WorkerPort(pod *corev1.Pod) (int, error)

Jump to

Keyboard shortcuts

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