Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the serving v1alpha1 API group +kubebuilder:object:generate=true +groupName=serving.kubeflow.org
Copyright 2021 IBM Corporation ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2021 IBM Corporation ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
const (
SecretKeyAnnotation = "serving.kserve.io/secret-key"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "serving.kubeflow.org", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func BuildPredictorWithBase ¶
func BuildPredictorWithBase(t *TrainedModel) *api.Predictor
Types ¶
type Condition ¶
type Condition struct { Type string `json:"type"` Status corev1.ConditionStatus `json:"status"` }
This is used for reflecting the Ready status of the resource according to the TrainedModel CRD's expected key which is: status.conditions[?(@.type=='Ready')].status
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Conditions ¶
type Conditions []Condition
func (Conditions) DeepCopy ¶
func (in Conditions) DeepCopy() Conditions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conditions.
func (Conditions) DeepCopyInto ¶
func (in Conditions) DeepCopyInto(out *Conditions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelSpec ¶
type ModelSpec struct { // Storage URI for the model repository StorageURI string `json:"storageUri"` // Machine Learning <framework name> // The values could be: "tensorflow","pytorch","sklearn","onnx","xgboost", "myawesomeinternalframework" etc. Framework string `json:"framework"` // Maximum memory this model will consume, this field is used to decide if a model server has enough memory to load this model. Memory resource.Quantity `json:"memory"` }
ModelSpec describes a TrainedModel
func (*ModelSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelSpec.
func (*ModelSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TrainedModel ¶
type TrainedModel struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec TrainedModelSpec `json:"spec,omitempty"` Status TrainedModelStatus `json:"status,omitempty"` }
+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="URL",type="string",JSONPath=".status.url" +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:path=trainedmodels,shortName=tm,singular=trainedmodel TrainedModel is the Schema for the trainedmodels API
func (*TrainedModel) DeepCopy ¶
func (in *TrainedModel) DeepCopy() *TrainedModel
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrainedModel.
func (*TrainedModel) DeepCopyInto ¶
func (in *TrainedModel) DeepCopyInto(out *TrainedModel)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TrainedModel) DeepCopyObject ¶
func (in *TrainedModel) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TrainedModelList ¶
type TrainedModelList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []TrainedModel `json:"items"` }
TrainedModelList contains a list of TrainedModel
func (*TrainedModelList) DeepCopy ¶
func (in *TrainedModelList) DeepCopy() *TrainedModelList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrainedModelList.
func (*TrainedModelList) DeepCopyInto ¶
func (in *TrainedModelList) DeepCopyInto(out *TrainedModelList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TrainedModelList) DeepCopyObject ¶
func (in *TrainedModelList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TrainedModelRegistry ¶
+kubebuilder:object:generate=false
func (TrainedModelRegistry) Get ¶
func (tmr TrainedModelRegistry) Get(ctx context.Context, nname types.NamespacedName) (*api.Predictor, error)
func (TrainedModelRegistry) GetSourceName ¶
func (tmr TrainedModelRegistry) GetSourceName() string
func (TrainedModelRegistry) UpdateStatus ¶
type TrainedModelSpec ¶
type TrainedModelSpec struct { // parent inference service to deploy to // +required InferenceService string `json:"inferenceService"` // Predictor model spec // +required Model ModelSpec `json:"model"` }
TrainedModelSpec defines the desired state of TrainedModel
func (*TrainedModelSpec) DeepCopy ¶
func (in *TrainedModelSpec) DeepCopy() *TrainedModelSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrainedModelSpec.
func (*TrainedModelSpec) DeepCopyInto ¶
func (in *TrainedModelSpec) DeepCopyInto(out *TrainedModelSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TrainedModelStatus ¶
type TrainedModelStatus struct { // +optional URL string `json:"url,omitempty"` api.PredictorStatus `json:",inline"` // Conditions the latest available observations of a resource's current state. // +optional // +patchMergeKey=type // +patchStrategy=merge Conditions Conditions `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` }
TrainedModelStatus defines the observed state of TrainedModel
func (*TrainedModelStatus) DeepCopy ¶
func (in *TrainedModelStatus) DeepCopy() *TrainedModelStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrainedModelStatus.
func (*TrainedModelStatus) DeepCopyInto ¶
func (in *TrainedModelStatus) DeepCopyInto(out *TrainedModelStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.