Documentation
¶
Index ¶
- Constants
- Variables
- func CompareSecrets(refs []corev1.LocalObjectReference, secrets []string) bool
- func CopySecret(original *corev1.Secret, targetNamespace string) *corev1.Secret
- func ExecSync(ctx context.Context, config *rest.Config, coreClient *kubernetes.Clientset, ...) (string, error)
- func ExtractModelVersion(configs map[string]interface{}) (map[string]string, error)
- func GenerateE2ETuningConfigMapManifest(namespace string) *corev1.ConfigMap
- func GenerateE2ETuningWorkspaceManifest(name, namespace, imageName, datasetImageName, outputRegistry string, ...) *kaitov1alpha1.Workspace
- func GenerateInferenceWorkspaceManifest(name, namespace, imageName string, resourceCount int, instanceType string, ...) *kaitov1alpha1.Workspace
- func GenerateInferenceWorkspaceManifestWithVLLM(name, namespace, imageName string, resourceCount int, instanceType string, ...) *kaitov1alpha1.Workspace
- func GeneratePodTemplate(name, namespace, image string, labels map[string]string) *corev1.PodTemplateSpec
- func GenerateRandomString() string
- func GenerateTuningWorkspaceManifest(name, namespace, imageName string, resourceCount int, instanceType string, ...) *kaitov1alpha1.Workspace
- func GetAllValidNodeClaims(ctx context.Context, workspaceObj *v1alpha1.Workspace) (*karpenterv1.NodeClaimList, error)
- func GetClusterClient(cluster *Cluster)
- func GetEnv(envVar string) string
- func GetK8sClientset() (*kubernetes.Clientset, error)
- func GetK8sConfig() (*rest.Config, error)
- func GetModelConfigInfo(configFilePath string) (map[string]interface{}, error)
- func GetPodLogs(coreClient *kubernetes.Clientset, namespace, podName, containerName string) (string, error)
- func GetPodNameForDeployment(coreClient *kubernetes.Clientset, namespace, deploymentName string) (string, error)
- func GetPodNameForJob(coreClient *kubernetes.Clientset, namespace, jobName string) (string, error)
- func PrintPodLogsOnFailure(namespace, labelSelector string)
- func ValidateNodeClaimCreation(ctx context.Context, workspaceObj *v1alpha1.Workspace, expectedCount int)
- type Cluster
Constants ¶
View Source
const ( InferenceModeCustomTemplate kaitov1alpha1.ModelImageAccessMode = "customTemplate" ExampleDatasetURL = "" /* 140-byte string literal not displayed */ )
View Source
const (
E2eNamespace = "kaito-e2e"
)
Variables ¶
View Source
var ( // PollInterval defines the interval time for a poll operation. PollInterval = 2 * time.Second // PollTimeout defines the time after which the poll operation times out. PollTimeout = 120 * time.Second )
View Source
var (
TestingCluster = NewCluster(scheme)
)
Functions ¶
func CompareSecrets ¶
func CompareSecrets(refs []corev1.LocalObjectReference, secrets []string) bool
func ExtractModelVersion ¶
func GenerateE2ETuningConfigMapManifest ¶
GenerateE2ETuningConfigMapManifest generates a ConfigMap manifest for E2E tuning.
func GenerateE2ETuningWorkspaceManifest ¶
func GenerateE2ETuningWorkspaceManifest(name, namespace, imageName, datasetImageName, outputRegistry string, resourceCount int, instanceType string, labelSelector *metav1.LabelSelector, preferredNodes []string, presetName kaitov1alpha1.ModelName, accessMode kaitov1alpha1.ModelImageAccessMode, imagePullSecret []string, customConfigMapName string) *kaitov1alpha1.Workspace
func GenerateInferenceWorkspaceManifest ¶
func GenerateInferenceWorkspaceManifest(name, namespace, imageName string, resourceCount int, instanceType string, labelSelector *metav1.LabelSelector, preferredNodes []string, presetName kaitov1alpha1.ModelName, accessMode kaitov1alpha1.ModelImageAccessMode, imagePullSecret []string, podTemplate *corev1.PodTemplateSpec, adapters []kaitov1alpha1.AdapterSpec) *kaitov1alpha1.Workspace
func GenerateInferenceWorkspaceManifestWithVLLM ¶
func GenerateInferenceWorkspaceManifestWithVLLM(name, namespace, imageName string, resourceCount int, instanceType string, labelSelector *metav1.LabelSelector, preferredNodes []string, presetName kaitov1alpha1.ModelName, accessMode kaitov1alpha1.ModelImageAccessMode, imagePullSecret []string, podTemplate *corev1.PodTemplateSpec, adapters []kaitov1alpha1.AdapterSpec) *kaitov1alpha1.Workspace
func GeneratePodTemplate ¶
func GeneratePodTemplate(name, namespace, image string, labels map[string]string) *corev1.PodTemplateSpec
func GenerateRandomString ¶
func GenerateRandomString() string
GenerateRandomString generates a random number between 0 and 1000 and returns it as a string.
func GenerateTuningWorkspaceManifest ¶
func GenerateTuningWorkspaceManifest(name, namespace, imageName string, resourceCount int, instanceType string, labelSelector *metav1.LabelSelector, preferredNodes []string, input *kaitov1alpha1.DataSource, output *kaitov1alpha1.DataDestination, preset *kaitov1alpha1.PresetSpec, method kaitov1alpha1.TuningMethod) *kaitov1alpha1.Workspace
func GetAllValidNodeClaims ¶
func GetAllValidNodeClaims(ctx context.Context, workspaceObj *v1alpha1.Workspace) (*karpenterv1.NodeClaimList, error)
GetAllValidNodeClaims get all valid nodeClaims.
func GetClusterClient ¶
func GetClusterClient(cluster *Cluster)
GetClusterClient returns a Cluster client for the cluster.
func GetK8sClientset ¶ added in v0.4.1
func GetK8sClientset() (*kubernetes.Clientset, error)
func GetK8sConfig ¶
func GetModelConfigInfo ¶
func GetPodLogs ¶
func GetPodLogs(coreClient *kubernetes.Clientset, namespace, podName, containerName string) (string, error)
func GetPodNameForDeployment ¶
func GetPodNameForDeployment(coreClient *kubernetes.Clientset, namespace, deploymentName string) (string, error)
func GetPodNameForJob ¶
func GetPodNameForJob(coreClient *kubernetes.Clientset, namespace, jobName string) (string, error)
func PrintPodLogsOnFailure ¶
func PrintPodLogsOnFailure(namespace, labelSelector string)
Types ¶
Click to show internal directories.
Click to hide internal directories.