utils

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 18 Imported by: 11

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 added in v0.8.6

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 added in v0.9.1

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 added in v0.9.1

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 added in v0.9.1

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 added in v0.9.0

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 added in v0.9.9

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 added in v0.8.7

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

func PrintErrorMessage

func PrintErrorMessage(message string)

print the help infomation

func PrintModelVersion added in v0.9.14

func PrintModelVersion(mv *types.ModelVersion)

func PrintModelVersions added in v0.9.14

func PrintModelVersions(modelVersions []*types.ModelVersion)

func PrintRegisteredModel added in v0.9.14

func PrintRegisteredModel(rm *types.RegisteredModel)

func PrintRegisteredModels added in v0.9.14

func PrintRegisteredModels(registeredModels []*types.RegisteredModel)

func ReadUserConfirmation added in v0.9.14

func ReadUserConfirmation(prompt string) bool

func ResourceInContainers

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

func TransferLogLevel

func TransferLogLevel(loglevel string) types.LogLevel

func TransferModelJobType added in v0.9.0

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

func ValidateAndParseTags added in v0.9.14

func ValidateAndParseTags(tagsStr string) (map[string]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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