utils

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InferenceModeCustomTemplate kaitov1alpha1.ModelImageAccessMode = "customTemplate"
)

Variables

View Source
var (
	// PollInterval defines the interval time for a poll operation.
	PollInterval = 250 * time.Millisecond
	// PollTimeout defines the time after which the poll operation times out.
	PollTimeout = 60 * time.Second
)

Functions

func ExtractModelVersion added in v0.2.0

func ExtractModelVersion(configs map[string]interface{}) (map[string]string, error)

func GeneratePodTemplate

func GeneratePodTemplate(name, namespace, image string, labels map[string]string) *corev1.PodTemplateSpec

func GenerateWorkspaceManifest

func GenerateWorkspaceManifest(name, namespace, imageName string, resourceCount int, instanceType string,
	labelSelector *metav1.LabelSelector, preferredNodes []string, presetName kaitov1alpha1.ModelName,
	inferenceMode kaitov1alpha1.ModelImageAccessMode, imagePullSecret []string,
	podTemplate *corev1.PodTemplateSpec) *kaitov1alpha1.Workspace

func GetEnv

func GetEnv(envVar string) string

func GetModelConfigInfo added in v0.2.0

func GetModelConfigInfo(configFilePath string) (map[string]interface{}, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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