v1alpha1

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the kaito v1alpha1 API group +kubebuilder:object:generate=true +k8s:defaulter-gen=TypeMeta +groupName=kaito.sh

Index

Constants

View Source
const (
	// ConditionTypeMachineStatus is the state when checking machine status.
	ConditionTypeMachineStatus = ConditionType("MachineReady")

	// ConditionTypeNodeClaimStatus is the state when checking nodeClaim status.
	ConditionTypeNodeClaimStatus = ConditionType("NodeClaimReady")

	// ConditionTypeResourceStatus is the state when Resource has been created.
	ConditionTypeResourceStatus = ConditionType("ResourceReady")

	// WorkspaceConditionTypeInferenceStatus is the state when Inference service has been ready.
	WorkspaceConditionTypeInferenceStatus = ConditionType("InferenceReady")

	// RAGEneineConditionTypeServiceStatus is the state when service has been ready.
	RAGEneineConditionTypeServiceStatus = ConditionType("ServiceReady")

	// RAGConditionTypeServiceStatus is the state when RAG Engine service has been ready.
	RAGConditionTypeServiceStatus = ConditionType("RAGEngineServiceReady")

	// WorkspaceConditionTypeTuningJobStatus is the state when the tuning job starts normally.
	WorkspaceConditionTypeTuningJobStatus ConditionType = ConditionType("JobStarted")

	//RAGEngineConditionTypeDeleting is the RAGEngine state when starts to get deleted.
	RAGEngineConditionTypeDeleting = ConditionType("RAGEngineDeleting")

	//WorkspaceConditionTypeDeleting is the Workspace state when starts to get deleted.
	WorkspaceConditionTypeDeleting = ConditionType("WorkspaceDeleting")

	//WorkspaceConditionTypeSucceeded is the Workspace state that summarizes all operations' states.
	//For inference, the "True" condition means the inference service is ready to serve requests.
	//For fine tuning, the "True" condition means the tuning job completes successfully.
	WorkspaceConditionTypeSucceeded ConditionType = ConditionType("WorkspaceSucceeded")

	RAGEngineConditionTypeSucceeded ConditionType = ConditionType("RAGEngineSucceeded")
)
View Source
const (

	// KAITOPrefix Kubernetes Data Mining prefix.
	KAITOPrefix = "kaito.sh/"

	// AnnotationEnableLB determines whether kaito creates LoadBalancer type service for testing.
	AnnotationEnableLB = KAITOPrefix + "enablelb"

	// LabelWorkspaceName is the label for workspace name.
	LabelWorkspaceName = KAITOPrefix + "workspace"

	// LabelRAGEngineName is the label for ragengine name.
	LabelRAGEngineName = KAITOPrefix + "ragengine"

	// LabelWorkspaceName is the label for workspace namespace.
	LabelWorkspaceNamespace = KAITOPrefix + "workspacenamespace"

	// LabelRAGEngineNamespace is the label for ragengine namespace.
	LabelRAGEngineNamespace = KAITOPrefix + "ragenginenamespace"

	// WorkspaceRevisionAnnotation is the Annotations for revision number
	WorkspaceRevisionAnnotation = "workspace.kaito.io/revision"

	// RAGEngineRevisionAnnotation is the Annotations for revision number
	RAGEngineRevisionAnnotation = "ragengine.kaito.io/revision"

	// AnnotationWorkspaceRuntime is the annotation for runtime selection.
	AnnotationWorkspaceRuntime = KAITOPrefix + "runtime"
)
View Source
const (
	N_SERIES_PREFIX = "Standard_N"
	D_SERIES_PREFIX = "Standard_D"

	DefaultLoraConfigMapTemplate  = "lora-params-template"
	DefaultQloraConfigMapTemplate = "qlora-params-template"
	MaxAdaptersNumber             = 10
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "kaito.sh", Version: "v1alpha1"}
	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
)

Functions

func GetWorkspaceRuntimeName

func GetWorkspaceRuntimeName(ws *Workspace) model.RuntimeName

GetWorkspaceRuntimeName returns the runtime name of the workspace.

Types

type AdapterSpec

type AdapterSpec struct {
	// Source describes where to obtain the adapter data.
	// +optional
	Source *DataSource `json:"source,omitempty"`
	// Strength specifies the default multiplier for applying the adapter weights to the raw model weights.
	// It is usually a float number between 0 and 1. It is defined as a string type to be language agnostic.
	// +optional
	Strength *string `json:"strength,omitempty"`
}

func (*AdapterSpec) DeepCopy

func (in *AdapterSpec) DeepCopy() *AdapterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdapterSpec.

func (*AdapterSpec) DeepCopyInto

func (in *AdapterSpec) DeepCopyInto(out *AdapterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConditionType

type ConditionType string

ConditionType is a valid value for Condition.Type.

type Config

type Config struct {
	TrainingConfig TrainingConfig `yaml:"training_config"`
}

func UnmarshalTrainingConfig

func UnmarshalTrainingConfig(cm *corev1.ConfigMap) (*Config, *apis.FieldError)

func (*Config) DeepCopy

func (in *Config) DeepCopy() *Config

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DataDestination

type DataDestination struct {
	// The mounted volume that is used to save the output data.
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	// +optional
	Volume *v1.VolumeSource `json:"volumeSource,omitempty"`
	// Name of the image where the output data is pushed to.
	// +optional
	Image string `json:"image,omitempty"`
	// ImagePushSecret is the name of the secret in the same namespace that contains the authentication
	// information that is needed for running `docker push`.
	// +optional
	ImagePushSecret string `json:"imagePushSecret,omitempty"`
}

func (*DataDestination) DeepCopy

func (in *DataDestination) DeepCopy() *DataDestination

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataDestination.

func (*DataDestination) DeepCopyInto

func (in *DataDestination) DeepCopyInto(out *DataDestination)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DataSource

type DataSource struct {
	// The name of the dataset. The same name will be used as a container name.
	// It must be a valid DNS subdomain value,
	Name string `json:"name,omitempty"`
	// URLs specifies the links to the public data sources. E.g., files in a public github repository.
	// +optional
	URLs []string `json:"urls,omitempty"`
	// The mounted volume that contains the data.
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	// +optional
	Volume *v1.VolumeSource `json:"volumeSource,omitempty"`
	// The name of the image that contains the source data. The assumption is that the source data locates in the
	// `data` directory in the image.
	// +optional
	Image string `json:"image,omitempty"`
	// ImagePullSecrets is a list of secret names in the same namespace used for pulling the data image.
	// +optional
	ImagePullSecrets []string `json:"imagePullSecrets,omitempty"`
}

func (*DataSource) DeepCopy

func (in *DataSource) DeepCopy() *DataSource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataSource.

func (*DataSource) DeepCopyInto

func (in *DataSource) DeepCopyInto(out *DataSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EmbeddingSpec

type EmbeddingSpec struct {
	// Remote specifies how to generate embeddings for index data using a remote service.
	// Note that either Remote or Local needs to be specified, not both.
	// +optional
	Remote *RemoteEmbeddingSpec `json:"remote,omitempty"`
	// Local specifies how to generate embeddings for index data using a model run locally.
	// +optional
	Local *LocalEmbeddingSpec `json:"local,omitempty"`
}

func (*EmbeddingSpec) DeepCopy

func (in *EmbeddingSpec) DeepCopy() *EmbeddingSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmbeddingSpec.

func (*EmbeddingSpec) DeepCopyInto

func (in *EmbeddingSpec) DeepCopyInto(out *EmbeddingSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type InferenceServiceSpec

type InferenceServiceSpec struct {
	// URL points to a running inference service endpoint which accepts http(s) payload.
	URL string `json:"url"`
	// AccessSecret is the name of the secret that contains the service access token.
	// +optional
	AccessSecret string `json:"accessSecret,omitempty"`
}

func (*InferenceServiceSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InferenceServiceSpec.

func (*InferenceServiceSpec) DeepCopyInto

func (in *InferenceServiceSpec) DeepCopyInto(out *InferenceServiceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type InferenceSpec

type InferenceSpec struct {
	// Preset describes the base model that will be deployed with preset configurations.
	// +optional
	Preset *PresetSpec `json:"preset,omitempty"`
	// Template specifies the Pod template used to run the inference service. Users can specify custom Pod settings
	// if the preset configurations cannot meet the requirements. Note that if Preset is specified, Template should not
	// be specified and vice versa.
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	// +optional
	Template *v1.PodTemplateSpec `json:"template,omitempty"`
	// Adapters are integrated into the base model for inference.
	// Users can specify multiple adapters for the model and the respective weight of using each of them.
	// +optional
	Adapters []AdapterSpec `json:"adapters,omitempty"`
}

func (*InferenceSpec) DeepCopy

func (in *InferenceSpec) DeepCopy() *InferenceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InferenceSpec.

func (*InferenceSpec) DeepCopyInto

func (in *InferenceSpec) DeepCopyInto(out *InferenceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LocalEmbeddingSpec

type LocalEmbeddingSpec struct {
	// Image is the name of the containerized embedding model image.
	// +optional
	Image string `json:"image,omitempty"`
	// +optional
	ImagePullSecret string `json:"imagePullSecret,omitempty"`
	// ModelID is the ID of the embedding model hosted by huggingface, e.g., BAAI/bge-small-en-v1.5.
	// When this field is specified, the RAG engine will download the embedding model
	// from huggingface repository during startup. The embedding model will not persist in local storage.
	// Note that if Image is specified, ModelID should not be specified and vice versa.
	// +optional
	ModelID string `json:"modelID,omitempty"`
	// ModelAccessSecret is the name of the secret that contains the huggingface access token.
	// +optional
	ModelAccessSecret string `json:"modelAccessSecret,omitempty"`
}

func (*LocalEmbeddingSpec) DeepCopy

func (in *LocalEmbeddingSpec) DeepCopy() *LocalEmbeddingSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalEmbeddingSpec.

func (*LocalEmbeddingSpec) DeepCopyInto

func (in *LocalEmbeddingSpec) DeepCopyInto(out *LocalEmbeddingSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ModelImageAccessMode

type ModelImageAccessMode string

+kubebuilder:validation:Enum=public;private

const (
	ModelImageAccessModePublic  ModelImageAccessMode = "public"
	ModelImageAccessModePrivate ModelImageAccessMode = "private"
)

type ModelName

type ModelName string

type PresetMeta

type PresetMeta struct {
	// Name of the supported models with preset configurations.
	Name ModelName `json:"name"`
	// AccessMode specifies whether the containerized model image is accessible via public registry
	// or private registry. This field defaults to "public" if not specified.
	// If this field is "private", user needs to provide the private image information in PresetOptions.
	// +kubebuilder:default:="public"
	// +optional
	AccessMode ModelImageAccessMode `json:"accessMode,omitempty"`
}

func (*PresetMeta) DeepCopy

func (in *PresetMeta) DeepCopy() *PresetMeta

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PresetMeta.

func (*PresetMeta) DeepCopyInto

func (in *PresetMeta) DeepCopyInto(out *PresetMeta)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PresetOptions

type PresetOptions struct {
	// Image is the name of the containerized model image.
	// +optional
	Image string `json:"image,omitempty"`
	// ImagePullSecrets is a list of secret names in the same namespace used for pulling the model image.
	// +optional
	ImagePullSecrets []string `json:"imagePullSecrets,omitempty"`
}

func (*PresetOptions) DeepCopy

func (in *PresetOptions) DeepCopy() *PresetOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PresetOptions.

func (*PresetOptions) DeepCopyInto

func (in *PresetOptions) DeepCopyInto(out *PresetOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PresetSpec

type PresetSpec struct {
	PresetMeta `json:",inline"`
	// +optional
	PresetOptions `json:"presetOptions,omitempty"`
}

PresetSpec provides the information for rendering preset configurations to run the model inference service.

func (*PresetSpec) DeepCopy

func (in *PresetSpec) DeepCopy() *PresetSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PresetSpec.

func (*PresetSpec) DeepCopyInto

func (in *PresetSpec) DeepCopyInto(out *PresetSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RAGEngine

type RAGEngine struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec *RAGEngineSpec `json:"spec,omitempty"`

	Status RAGEngineStatus `json:"status,omitempty"`
}

RAGEngine is the Schema for the ragengine API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=ragengines,scope=Namespaced,categories=ragengine +kubebuilder:storageversion +kubebuilder:printcolumn:name="Instance",type="string",JSONPath=".spec.compute.instanceType",description="" +kubebuilder:printcolumn:name="ResourceReady",type="string",JSONPath=".status.conditions[?(@.type==\"ResourceReady\")].status",description="" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""

func (*RAGEngine) DeepCopy

func (in *RAGEngine) DeepCopy() *RAGEngine

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RAGEngine.

func (*RAGEngine) DeepCopyInto

func (in *RAGEngine) DeepCopyInto(out *RAGEngine)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RAGEngine) DeepCopyObject

func (in *RAGEngine) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*RAGEngine) SetDefaults

func (w *RAGEngine) SetDefaults(_ context.Context)

SetDefaults for the RAG Engine

func (*RAGEngine) SupportedVerbs

func (w *RAGEngine) SupportedVerbs() []admissionregistrationv1.OperationType

func (*RAGEngine) Validate

func (w *RAGEngine) Validate(ctx context.Context) (errs *apis.FieldError)

type RAGEngineList

type RAGEngineList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []RAGEngine `json:"items"`
}

RAGEngineList contains a list of RAGEngine +kubebuilder:object:root=true

func (*RAGEngineList) DeepCopy

func (in *RAGEngineList) DeepCopy() *RAGEngineList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RAGEngineList.

func (*RAGEngineList) DeepCopyInto

func (in *RAGEngineList) DeepCopyInto(out *RAGEngineList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RAGEngineList) DeepCopyObject

func (in *RAGEngineList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RAGEngineSpec

type RAGEngineSpec struct {
	// Compute specifies the dedicated GPU resource used by an embedding model running locally if required.
	// +optional
	Compute *ResourceSpec `json:"compute,omitempty"`
	// Storage specifies how to access the vector database used to save the embedding vectors.
	// If this field is not specified, by default, an in-memory vector DB will be used.
	// The data will not be persisted.
	// +optional
	Storage *StorageSpec `json:"storage,omitempty"`
	// Embedding specifies whether the RAG engine generates embedding vectors using a remote service
	// or using a embedding model running locally.
	Embedding        *EmbeddingSpec        `json:"embedding"`
	InferenceService *InferenceServiceSpec `json:"inferenceService"`
	// QueryServiceName is the name of the service which exposes the endpoint for accepting user queries to the
	// inference service. If not specified, a default service name will be created by the RAG engine.
	// +optional
	QueryServiceName string `json:"queryServiceName,omitempty"`
	// IndexServiceName is the name of the service which exposes the endpoint for user to input the index data
	// to generate embeddings. If not specified, a default service name will be created by the RAG engine.
	// +optional
	IndexServiceName string `json:"indexServiceName,omitempty"`
}

func (*RAGEngineSpec) DeepCopy

func (in *RAGEngineSpec) DeepCopy() *RAGEngineSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RAGEngineSpec.

func (*RAGEngineSpec) DeepCopyInto

func (in *RAGEngineSpec) DeepCopyInto(out *RAGEngineSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RAGEngineStatus

type RAGEngineStatus struct {
	// WorkerNodes is the list of nodes chosen to run the workload based on the RAGEngine resource requirement.
	// +optional
	WorkerNodes []string `json:"workerNodes,omitempty"`

	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

RAGEngineStatus defines the observed state of RAGEngine

func (*RAGEngineStatus) DeepCopy

func (in *RAGEngineStatus) DeepCopy() *RAGEngineStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RAGEngineStatus.

func (*RAGEngineStatus) DeepCopyInto

func (in *RAGEngineStatus) DeepCopyInto(out *RAGEngineStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RemoteEmbeddingSpec

type RemoteEmbeddingSpec struct {
	// URL points to a publicly available embedding service, such as OpenAI.
	URL string `json:"url"`
	// AccessSecret is the name of the secret that contains the service access token.
	// +optional
	AccessSecret string `json:"accessSecret,omitempty"`
}

func (*RemoteEmbeddingSpec) DeepCopy

func (in *RemoteEmbeddingSpec) DeepCopy() *RemoteEmbeddingSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteEmbeddingSpec.

func (*RemoteEmbeddingSpec) DeepCopyInto

func (in *RemoteEmbeddingSpec) DeepCopyInto(out *RemoteEmbeddingSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceSpec

type ResourceSpec struct {
	// Count is the required number of GPU nodes.
	// +optional
	// +kubebuilder:default:=1
	Count *int `json:"count,omitempty"`

	// InstanceType specifies the GPU node SKU.
	// This field defaults to "Standard_NC12s_v3" if not specified.
	// +optional
	// +kubebuilder:default:="Standard_NC12s_v3"
	InstanceType string `json:"instanceType,omitempty"`

	// LabelSelector specifies the required labels for the GPU nodes.
	LabelSelector *metav1.LabelSelector `json:"labelSelector"`

	// PreferredNodes is an optional node list specified by the user.
	// If a node in the list does not have the required labels, it will be ignored.
	// +optional
	PreferredNodes []string `json:"preferredNodes,omitempty"`
}

ResourceSpec describes the resource requirement of running the workload. If the number of nodes in the cluster that meet the InstanceType and LabelSelector requirements is small than the Count, controller will provision new nodes before deploying the workload. The final list of nodes used to run the workload is presented in workspace Status.

func (*ResourceSpec) DeepCopy

func (in *ResourceSpec) DeepCopy() *ResourceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.

func (*ResourceSpec) DeepCopyInto

func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StorageSpec

type StorageSpec struct {
}

func (*StorageSpec) DeepCopy

func (in *StorageSpec) DeepCopy() *StorageSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageSpec.

func (*StorageSpec) DeepCopyInto

func (in *StorageSpec) DeepCopyInto(out *StorageSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TrainingConfig

type TrainingConfig struct {
	ModelConfig        map[string]runtime.RawExtension `yaml:"ModelConfig"`
	QuantizationConfig map[string]runtime.RawExtension `yaml:"QuantizationConfig"`
	LoraConfig         map[string]runtime.RawExtension `yaml:"LoraConfig"`
	TrainingArguments  map[string]runtime.RawExtension `yaml:"TrainingArguments"`
	DatasetConfig      map[string]runtime.RawExtension `yaml:"DatasetConfig"`
	DataCollator       map[string]runtime.RawExtension `yaml:"DataCollator"`
}

func (*TrainingConfig) DeepCopy

func (in *TrainingConfig) DeepCopy() *TrainingConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrainingConfig.

func (*TrainingConfig) DeepCopyInto

func (in *TrainingConfig) DeepCopyInto(out *TrainingConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TrainingConfig) UnmarshalYAML

func (t *TrainingConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML custom method

type TuningMethod

type TuningMethod string
const (
	TuningMethodLora  TuningMethod = "lora"
	TuningMethodQLora TuningMethod = "qlora"
)

type TuningSpec

type TuningSpec struct {
	// Preset describes which model to load for tuning.
	// +optional
	Preset *PresetSpec `json:"preset,omitempty"`
	// Method specifies the Parameter-Efficient Fine-Tuning(PEFT) method, such as lora, qlora, used for the tuning.
	// +optional
	Method TuningMethod `json:"method,omitempty"`
	// Config specifies the name of a custom ConfigMap that contains tuning arguments.
	// If specified, the ConfigMap must be in the same namespace as the Workspace custom resource.
	// If not specified, a default Config is used based on the specified tuning method.
	// +optional
	Config string `json:"config,omitempty"`
	// Input describes the input used by the tuning method.
	Input *DataSource `json:"input"`
	// Output specified where to store the tuning output.
	Output *DataDestination `json:"output"`
}

func (*TuningSpec) DeepCopy

func (in *TuningSpec) DeepCopy() *TuningSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TuningSpec.

func (*TuningSpec) DeepCopyInto

func (in *TuningSpec) DeepCopyInto(out *TuningSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Workspace

type Workspace struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Resource  ResourceSpec    `json:"resource,omitempty"`
	Inference *InferenceSpec  `json:"inference,omitempty"`
	Tuning    *TuningSpec     `json:"tuning,omitempty"`
	Status    WorkspaceStatus `json:"status,omitempty"`
}

Workspace is the Schema for the workspaces API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=workspaces,scope=Namespaced,categories=workspace,shortName={wk,wks} +kubebuilder:storageversion +kubebuilder:printcolumn:name="Instance",type="string",JSONPath=".resource.instanceType",description="" +kubebuilder:printcolumn:name="ResourceReady",type="string",JSONPath=".status.conditions[?(@.type==\"ResourceReady\")].status",description="" +kubebuilder:printcolumn:name="InferenceReady",type="string",JSONPath=".status.conditions[?(@.type==\"InferenceReady\")].status",description="" +kubebuilder:printcolumn:name="JobStarted",type="string",JSONPath=".status.conditions[?(@.type==\"JobStarted\")].status",description="" +kubebuilder:printcolumn:name="WorkspaceSucceeded",type="string",JSONPath=".status.conditions[?(@.type==\"WorkspaceSucceeded\")].status",description="" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""

func (*Workspace) DeepCopy

func (in *Workspace) DeepCopy() *Workspace

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workspace.

func (*Workspace) DeepCopyInto

func (in *Workspace) DeepCopyInto(out *Workspace)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Workspace) DeepCopyObject

func (in *Workspace) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Workspace) SetDefaults

func (w *Workspace) SetDefaults(_ context.Context)

SetDefaults for the Workspace

func (*Workspace) SupportedVerbs

func (w *Workspace) SupportedVerbs() []admissionregistrationv1.OperationType

func (*Workspace) Validate

func (w *Workspace) Validate(ctx context.Context) (errs *apis.FieldError)

type WorkspaceList

type WorkspaceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Workspace `json:"items"`
}

WorkspaceList contains a list of Workspace +kubebuilder:object:root=true

func (*WorkspaceList) DeepCopy

func (in *WorkspaceList) DeepCopy() *WorkspaceList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceList.

func (*WorkspaceList) DeepCopyInto

func (in *WorkspaceList) DeepCopyInto(out *WorkspaceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkspaceList) DeepCopyObject

func (in *WorkspaceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WorkspaceStatus

type WorkspaceStatus struct {
	// WorkerNodes is the list of nodes chosen to run the workload based on the workspace resource requirement.
	// +optional
	WorkerNodes []string `json:"workerNodes,omitempty"`

	// Conditions report the current conditions of the workspace.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

WorkspaceStatus defines the observed state of Workspace

func (*WorkspaceStatus) DeepCopy

func (in *WorkspaceStatus) DeepCopy() *WorkspaceStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceStatus.

func (*WorkspaceStatus) DeepCopyInto

func (in *WorkspaceStatus) DeepCopyInto(out *WorkspaceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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