utils

package
v0.0.0-...-1dfa148 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// training-operator
	OperatorNameLabel = "training.kubeflow.org/operator-name"
)

Variables

This section is empty.

Functions

func AcquireAllActivePods

func AcquireAllActivePods(client *kubernetes.Clientset) ([]*v1.Pod, error)

func AcquireAllActivePodsOfNode

func AcquireAllActivePodsOfNode(client *kubernetes.Clientset, nodeName string) ([]*v1.Pod, error)

func AliyunGPUCountInPod

func AliyunGPUCountInPod(pod *v1.Pod) int

func CPUCountInPod

func CPUCountInPod(pod *v1.Pod) float64

func CheckFileExist

func CheckFileExist(filename string) bool

func DataUnitTransfer

func DataUnitTransfer(from string, to string, value float64) float64

func DefineNodeStatus

func DefineNodeStatus(node *v1.Node) string

func DefinePodPhaseStatus

func DefinePodPhaseStatus(pod v1.Pod) (string, int, int, int)

DefinePodPhaseStatus returns the pod status display in kubectl

func GPUCoreCountInPod

func GPUCoreCountInPod(pod *v1.Pod) int

func GPUCountInPod

func GPUCountInPod(pod *v1.Pod) int

func GPUMemoryCountInPod

func GPUMemoryCountInPod(pod *v1.Pod) int

func GetContainerAllocation

func GetContainerAllocation(pod *v1.Pod) map[int]map[string]int

func GetContainerGPUCoreAllocation

func GetContainerGPUCoreAllocation(pod *v1.Pod) map[int]map[string]int

func GetDurationOfPod

func GetDurationOfPod(pod *v1.Pod) time.Duration

func GetFormatStyle

func GetFormatStyle() []types.FormatStyle

func GetLogLevel

func GetLogLevel() []types.LogLevel

func GetPendingTimeOfPod

func GetPendingTimeOfPod(pod *v1.Pod) time.Duration

func GetPodAllocation

func GetPodAllocation(pod *v1.Pod) map[string]int

func GetPodGPUCoreAllocation

func GetPodGPUCoreAllocation(pod *v1.Pod) map[string]int

func GetPodGPUTopologyAllocation

func GetPodGPUTopologyAllocation(pod *v1.Pod) []string

func GetPodGPUTopologyVisibleGPUs

func GetPodGPUTopologyVisibleGPUs(pod *v1.Pod) []string

func GetRunningTimeOfPod

func GetRunningTimeOfPod(pod *v1.Pod) time.Duration

func GetServingJobTypes

func GetServingJobTypes() []types.ServingJobType

func GetSupportModelJobTypesInfo

func GetSupportModelJobTypesInfo() string

func GetSupportServingJobTypesInfo

func GetSupportServingJobTypesInfo() string

func GetSupportTrainingJobTypesInfo

func GetSupportTrainingJobTypesInfo() string

func GetSupportedNodeTypes

func GetSupportedNodeTypes() []string

func GetTrainingJobTypes

func GetTrainingJobTypes() []types.TrainingJobType

GetTrainingJobTypes returns the supported training job types

func IsCompletedPod

func IsCompletedPod(pod *v1.Pod) bool

IsCompletedPod determines if the pod is completed or not

func IsDeepSpeedPod

func IsDeepSpeedPod(name, ns string, pod *v1.Pod) bool

func IsETPod

func IsETPod(name, ns string, pod *v1.Pod) bool

func IsHorovodPod

func IsHorovodPod(name, ns string, pod *v1.Pod) bool

func IsMPIPod

func IsMPIPod(name, ns string, pod *v1.Pod) bool

func IsPyTorchPod

func IsPyTorchPod(name, ns string, pod *v1.Pod) bool

func IsSparkPod

func IsSparkPod(name, ns string, item *v1.Pod) bool

func IsTensorFlowPod

func IsTensorFlowPod(name, ns string, pod *v1.Pod) bool

func IsVolcanoPod

func IsVolcanoPod(name, ns string, pod *v1.Pod) bool

func ParseK8sObjectsFromYamlFile

func ParseK8sObjectsFromYamlFile(filename string) ([]types.K8sObject, error)

func PrintErrorMessage

func PrintErrorMessage(message string)

print the help infomation

func ResourceInContainers

func ResourceInContainers(pod *v1.Pod, resourceName string) map[int]interface{}

func TransferLogLevel

func TransferLogLevel(loglevel string) types.LogLevel

func TransferModelJobType

func TransferModelJobType(jobType string) types.ModelJobType

func TransferNodeType

func TransferNodeType(nodeType string) types.NodeType

func TransferPrintFormat

func TransferPrintFormat(format string) types.FormatStyle

func TransferServingJobType

func TransferServingJobType(jobType string) types.ServingJobType

func TransferTrainingJobType

func TransferTrainingJobType(jobType string) types.TrainingJobType

TransferTrainingJobType returns the training job type

Types

This section is empty.

Jump to

Keyboard shortcuts

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