-
Notifications
You must be signed in to change notification settings - Fork 89
[v0.1 API Review] Grammatical fixes and TypedCondition creation/defaulting #186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
050d707
a9f18ce
5fab019
9942311
34bd2b2
4fb9e22
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,7 +144,7 @@ const ( | |
// to exist at request time, the error is processed by the Inference Gateway | ||
// and emitted on the appropriate InferenceModel object. | ||
type TargetModel struct { | ||
// Name is the name of the adapter as expected by the ModelServer. | ||
// Name is the name of the adapter or base model, as expected by the ModelServer. | ||
// | ||
// +kubebuilder:validation:MaxLength=253 | ||
// +kubebuilder:validation:Required | ||
|
@@ -174,10 +174,54 @@ type TargetModel struct { | |
|
||
// InferenceModelStatus defines the observed state of InferenceModel | ||
type InferenceModelStatus struct { | ||
// Conditions track the state of the InferencePool. | ||
// Conditions track the state of the InferenceModel. | ||
// | ||
// Known condition types are: | ||
// | ||
// * "Accepted" | ||
// | ||
// +optional | ||
// +listType=map | ||
// +listMapKey=type | ||
// +kubebuilder:validation:MaxItems=8 | ||
// +kubebuilder:default={{type: "Ready", status: "Unknown", reason:"Pending", message:"Waiting for controller", lastTransitionTime: "1970-01-01T00:00:00Z"}} | ||
Conditions []metav1.Condition `json:"conditions,omitempty"` | ||
} | ||
|
||
// InferenceModelConditionType is a type of condition for the InferenceModel. | ||
type InferenceModelConditionType string | ||
|
||
// InferenceModelConditionReason is the reason for a given InferenceModelConditionType. | ||
type InferenceModelConditionReason string | ||
|
||
const ( | ||
// This condition indicates if the model config is accepted, and if not, why. | ||
// | ||
// Possible reasons for this condition to be True are: | ||
// | ||
// * "Accepted" | ||
// | ||
// Possible reasons for this condition to be False are: | ||
// | ||
// * "ModelNameInUse" | ||
// | ||
// Possible reasons for this condition to be Unknown are: | ||
// | ||
// * "Pending" | ||
// | ||
ModelConditionReady InferenceModelConditionType = "Accepted" | ||
|
||
// Desired state. Model conforms to the state of the pool. | ||
ModelReasonReady InferenceModelConditionReason = "Accepted" | ||
|
||
// This reason is used when a given ModelName already exists within the pool. | ||
// Details about naming conflict resolution are on the ModelName field itself. | ||
ModelReasonNameInUse InferenceModelConditionReason = "ModelNameInUse" | ||
|
||
// This reason is the initial state, and indicates that the controller has not yet reconciled the InferenceModel. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we expect that an InferenceModel status to revert back to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I doubt it would ever go from |
||
ModelReasonPending InferenceModelConditionReason = "Pending" | ||
) | ||
|
||
func init() { | ||
SchemeBuilder.Register(&InferenceModel{}, &InferenceModelList{}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update variable names too