contorller

package
v0.0.0-...-026f811 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxRetries is the number of times a queue item will be retried before it is dropped out of the queue.
	// With the current rate-limiter in use (5ms*2^(maxRetries-1)) the following numbers represent the times
	// a queue item is going to be requeued:
	//
	// 1-10 retry times: 5ms, 10ms, 20ms, 40ms, 80ms, 160ms, 320ms, 640ms, 1.3s, 2.6s,
	// 11-20 retry times: 5.1s, 10.2s, 20.4s, 41s, 82s, 164s, 328s, 656s(11min), 1312s(21min), 2624s(43min)
	MaxRetries = 15
	// Suspend is a flag annotation for pytorchjob to use the queueunit crd
	Suspend = "scheduling.x-k8s.io/suspend"
)
View Source
const (
	ConsumerRefKind       = pytorchjobv1.Kind
	ConsumerRefAPIVersion = pytorchjobv1.GroupName + "/" + pytorchjobv1.GroupVersion
	// QuNameSuffix is the suffix of the queue unit name when create a new one.
	// In this way, different types of jobs with the same name will create different queue unit name.
	QuNameSuffix = "-pytorch-qu"
	Queuing      = "Queuing"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PyTorchExtensionController

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

func NewPyTorchExtensionController

func NewPyTorchExtensionController(
	k8sClient *kubernetes.Clientset,
	queueInformer queueInformers.QueueUnitInformer,
	queueClient *queueversioned.Clientset,
	pytorchJobInformer pytorchjobinformers.PyTorchJobInformer,
	pytorchJobClient *pytorchjobversioned.Clientset) *PyTorchExtensionController

func (*PyTorchExtensionController) AddPyTorchJob

func (pc *PyTorchExtensionController) AddPyTorchJob(obj interface{})

func (*PyTorchExtensionController) AddQueueUnit

func (pc *PyTorchExtensionController) AddQueueUnit(obj interface{})

func (*PyTorchExtensionController) DeletePyTorchJob

func (pc *PyTorchExtensionController) DeletePyTorchJob(obj interface{})

func (*PyTorchExtensionController) DeleteQueueAnnotationInPyTorchJob

func (pc *PyTorchExtensionController) DeleteQueueAnnotationInPyTorchJob(qu *v1alpha1.QueueUnit) error

func (*PyTorchExtensionController) DeleteQueueUnit

func (pc *PyTorchExtensionController) DeleteQueueUnit(obj interface{})

func (*PyTorchExtensionController) Run

func (pc *PyTorchExtensionController) Run(threadiness int, stopCh <-chan struct{}) error

func (*PyTorchExtensionController) UpdatePyTorchJob

func (pc *PyTorchExtensionController) UpdatePyTorchJob(_, newObj interface{})

func (*PyTorchExtensionController) UpdateQueueUnit

func (pc *PyTorchExtensionController) UpdateQueueUnit(oldObj, newObj interface{})

Jump to

Keyboard shortcuts

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