utils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModelNameLabelKey   = workload.GroupName + "/model-name"
	BackendNameLabelKey = workload.GroupName + "/backend-name"
	ManageBy            = workload.GroupName + "/managed-by"
	RevisionLabelKey    = workload.GroupName + "/revision"
	OwnerUIDKey         = workload.GroupName + "/model-uid"
)

Variables

View Source
var XPUList = []corev1.ResourceName{"nvidia.com/gpu", "huawei.com/ascend-1980"}

Functions

func ConvertVLLMArgsFromJson

func ConvertVLLMArgsFromJson(config *apiextensionsv1.JSON) ([]string, error)

func GetBackendResourceName

func GetBackendResourceName(modelName string, backendName string) string

func GetDeviceNum

func GetDeviceNum(worker *workloadv1alpha1.ModelWorker) int64

func GetInClusterNameSpace

func GetInClusterNameSpace() (string, error)

GetInClusterNameSpace gets the namespace of model controller

func GetModelControllerLabels

func GetModelControllerLabels(model *workload.ModelBooster, backendName string, revision string) map[string]string

func ReplaceEmbeddedPlaceholders

func ReplaceEmbeddedPlaceholders(s string, values *map[string]interface{}) (string, error)

func ReplacePlaceholders

func ReplacePlaceholders(data *interface{}, values *map[string]interface{}) error

func TryGetField

func TryGetField(config []byte, key string) (any, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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