Documentation ¶
Index ¶
- Constants
- Variables
- func CopySecret(original *corev1.Secret, targetNamespace string) *corev1.Secret
- 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 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) (*v1beta1.NodeClaimList, error)
- func GetClusterClient(cluster *Cluster)
- func GetEnv(envVar string) string
- func GetK8sConfig() (*kubernetes.Clientset, 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 ValidateMachineCreation(ctx context.Context, workspaceObj *v1alpha1.Workspace, expectedCount int)
- 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 CopySecret ¶ added in v0.3.0
func ExtractModelVersion ¶ added in v0.2.0
func GenerateE2ETuningConfigMapManifest ¶ added in v0.3.0
GenerateE2ETuningConfigMapManifest generates a ConfigMap manifest for E2E tuning.
func GenerateE2ETuningWorkspaceManifest ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 GeneratePodTemplate ¶
func GeneratePodTemplate(name, namespace, image string, labels map[string]string) *corev1.PodTemplateSpec
func GenerateRandomString ¶ added in v0.3.0
func GenerateRandomString() string
GenerateRandomString generates a random number between 0 and 1000 and returns it as a string.
func GenerateTuningWorkspaceManifest ¶ added in v0.3.0
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 ¶ added in v0.3.1
func GetAllValidNodeClaims(ctx context.Context, workspaceObj *v1alpha1.Workspace) (*v1beta1.NodeClaimList, error)
GetAllValidNodeClaims get all valid nodeClaims.
func GetClusterClient ¶ added in v0.3.1
func GetClusterClient(cluster *Cluster)
GetClusterClient returns a Cluster client for the cluster.
func GetK8sConfig ¶ added in v0.3.0
func GetK8sConfig() (*kubernetes.Clientset, error)
func GetModelConfigInfo ¶ added in v0.2.0
func GetPodLogs ¶ added in v0.3.0
func GetPodLogs(coreClient *kubernetes.Clientset, namespace, podName, containerName string) (string, error)
func GetPodNameForDeployment ¶ added in v0.3.1
func GetPodNameForDeployment(coreClient *kubernetes.Clientset, namespace, deploymentName string) (string, error)
func GetPodNameForJob ¶ added in v0.3.0
func GetPodNameForJob(coreClient *kubernetes.Clientset, namespace, jobName string) (string, error)
func PrintPodLogsOnFailure ¶ added in v0.3.1
func PrintPodLogsOnFailure(namespace, labelSelector string)
Types ¶
Click to show internal directories.
Click to hide internal directories.