Skip to content

Commit

Permalink
llm service version crd definition, frontend and backend
Browse files Browse the repository at this point in the history
Signed-off-by: ZHANGWENTAI <2092913428@qq.com>
  • Loading branch information
ZHANGWENTAI committed Oct 31, 2024
1 parent 9fb1a10 commit 0ae8548
Show file tree
Hide file tree
Showing 21 changed files with 6,577 additions and 16 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,12 @@ vendor

# arch
arch

# model cache dir
.kubedl_model_cache

# vllm install package
vllm*.whl

# backend server executable file
backend-server
54 changes: 54 additions & 0 deletions api/v1alpha1/llmserviceversion_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// LLMServiceVersionSpec defines the desired state of LLMServiceVersion
type LLMServiceVersionSpec struct {
// Version number of the LLM service
Version string `json:"version"`

// ModelName is the name of the LLM model
ModelName string `json:"modelName"`

// CreationTime is the time when this version was created
CreationTime string `json:"creationTime"`

// AssociatedExperimentSpec is the spec of the associated experiment
AssociatedExperimentSpec ProfilingExperimentSpec `json:"associatedExperimentSpec"`
}

// LLMServiceVersionStatus defines the observed state of LLMServiceVersion
type LLMServiceVersionStatus struct {
// TestCompletionTime is the time when testing for this version was completed
TestCompletionTime metav1.Time `json:"testCompletionTime,omitempty"`

// AssociatedExperimentStatus is the status of the associated experiment
AssociatedExperimentStatus ProfilingExperimentStatus `json:"associatedExperimentStatus"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

// LLMServiceVersion is the Schema for the llmserviceversions API
type LLMServiceVersion struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec LLMServiceVersionSpec `json:"spec,omitempty"`
Status LLMServiceVersionStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true
// LLMServiceVersionList contains a list of LLMServiceVersion
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type LLMServiceVersionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []LLMServiceVersion `json:"items"`
}

func init() {
SchemeBuilder.Register(&LLMServiceVersion{}, &LLMServiceVersionList{})
}
93 changes: 92 additions & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0ae8548

Please sign in to comment.