Documentation
¶
Overview ¶
Package v1alpha2 contains API Schema definitions for the serving v1alpha2 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=kfserving/pkg/apis/serving +k8s:defaulter-gen=TypeMeta +groupName=serving.kubeflow.org
Package v1alpha2 contains API Schema definitions for the serving v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=kfserving/pkg/apis/serving +k8s:defaulter-gen=TypeMeta +groupName=serving.kubeflow.org
Index ¶
- Constants
- Variables
- func GetInferenceServiceConfigMap(client client.Client) (*v1.ConfigMap, error)
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- func Resource(resource string) schema.GroupResource
- type AlibiExplainerSpec
- func (s *AlibiExplainerSpec) ApplyExplainerDefaults(config *ExplainersConfig)
- func (s *AlibiExplainerSpec) CreateExplainerContainer(modelName string, predictorHost string, config *ExplainersConfig) *v1.Container
- func (in *AlibiExplainerSpec) DeepCopy() *AlibiExplainerSpec
- func (in *AlibiExplainerSpec) DeepCopyInto(out *AlibiExplainerSpec)
- func (s *AlibiExplainerSpec) GetStorageUri() string
- func (s *AlibiExplainerSpec) ValidateExplainer(config *ExplainersConfig) error
- type AlibiExplainerType
- type CustomSpec
- func (c *CustomSpec) ApplyDefaults(config *PredictorsConfig)
- func (c *CustomSpec) ApplyExplainerDefaults(config *ExplainersConfig)
- func (c *CustomSpec) ApplyTransformerDefaults(config *TransformersConfig)
- func (c *CustomSpec) CreateExplainerContainer(modelName string, predictUrl string, config *ExplainersConfig) *v1.Container
- func (in *CustomSpec) DeepCopy() *CustomSpec
- func (in *CustomSpec) DeepCopyInto(out *CustomSpec)
- func (c *CustomSpec) GetContainer(modelName string, config *PredictorsConfig) *v1.Container
- func (c *CustomSpec) GetContainerSpec() *v1.Container
- func (c *CustomSpec) GetStorageUri() string
- func (c *CustomSpec) Validate(config *PredictorsConfig) error
- func (c *CustomSpec) ValidateExplainer(config *ExplainersConfig) error
- func (c *CustomSpec) ValidateTransformer(config *TransformersConfig) error
- type DeploymentSpec
- type EndpointSpec
- type EndpointStatusMap
- type Explainer
- type ExplainerConfig
- type ExplainerSpec
- func (e *ExplainerSpec) ApplyDefaults(config *ExplainersConfig)
- func (e *ExplainerSpec) CreateExplainerContainer(modelName string, predictorHost string, config *ExplainersConfig) *v1.Container
- func (in *ExplainerSpec) DeepCopy() *ExplainerSpec
- func (in *ExplainerSpec) DeepCopyInto(out *ExplainerSpec)
- func (e *ExplainerSpec) GetStorageUri() string
- func (e *ExplainerSpec) Validate(config *ExplainersConfig) error
- type ExplainersConfig
- type InferenceService
- func (in *InferenceService) DeepCopy() *InferenceService
- func (in *InferenceService) DeepCopyInto(out *InferenceService)
- func (in *InferenceService) DeepCopyObject() runtime.Object
- func (isvc *InferenceService) Default(client client.Client)
- func (isvc *InferenceService) ValidateCreate(client client.Client) error
- func (isvc *InferenceService) ValidateUpdate(old runtime.Object, client client.Client) error
- type InferenceServiceList
- type InferenceServiceSpec
- type InferenceServiceStatus
- func (in *InferenceServiceStatus) DeepCopy() *InferenceServiceStatus
- func (in *InferenceServiceStatus) DeepCopyInto(out *InferenceServiceStatus)
- func (ss *InferenceServiceStatus) GetCondition(t apis.ConditionType) *apis.Condition
- func (ss *InferenceServiceStatus) InitializeConditions()
- func (ss *InferenceServiceStatus) IsReady() bool
- func (ss *InferenceServiceStatus) PropagateCanaryStatus(endpoint constants.InferenceServiceEndpoint, ...)
- func (ss *InferenceServiceStatus) PropagateDefaultStatus(endpoint constants.InferenceServiceEndpoint, ...)
- func (ss *InferenceServiceStatus) PropagateRouteStatus(vs *VirtualServiceStatus)
- type ONNXSpec
- func (s *ONNXSpec) ApplyDefaults(config *PredictorsConfig)
- func (in *ONNXSpec) DeepCopy() *ONNXSpec
- func (in *ONNXSpec) DeepCopyInto(out *ONNXSpec)
- func (s *ONNXSpec) GetContainer(modelName string, config *PredictorsConfig) *v1.Container
- func (s *ONNXSpec) GetStorageUri() string
- func (s *ONNXSpec) Validate(config *PredictorsConfig) error
- type Predictor
- type PredictorConfig
- type PredictorSpec
- func (p *PredictorSpec) ApplyDefaults(config *PredictorsConfig)
- func (in *PredictorSpec) DeepCopy() *PredictorSpec
- func (in *PredictorSpec) DeepCopyInto(out *PredictorSpec)
- func (p *PredictorSpec) GetContainer(modelName string, config *PredictorsConfig) *v1.Container
- func (p *PredictorSpec) GetStorageUri() string
- func (p *PredictorSpec) Validate(config *PredictorsConfig) error
- type PredictorsConfig
- type PyTorchSpec
- func (s *PyTorchSpec) ApplyDefaults(config *PredictorsConfig)
- func (in *PyTorchSpec) DeepCopy() *PyTorchSpec
- func (in *PyTorchSpec) DeepCopyInto(out *PyTorchSpec)
- func (s *PyTorchSpec) GetContainer(modelName string, config *PredictorsConfig) *v1.Container
- func (s *PyTorchSpec) GetStorageUri() string
- func (s *PyTorchSpec) Validate(config *PredictorsConfig) error
- type SKLearnSpec
- func (s *SKLearnSpec) ApplyDefaults(config *PredictorsConfig)
- func (in *SKLearnSpec) DeepCopy() *SKLearnSpec
- func (in *SKLearnSpec) DeepCopyInto(out *SKLearnSpec)
- func (s *SKLearnSpec) GetContainer(modelName string, config *PredictorsConfig) *v1.Container
- func (s *SKLearnSpec) GetStorageUri() string
- func (s *SKLearnSpec) Validate(config *PredictorsConfig) error
- type StatusConfigurationSpec
- type TensorRTSpec
- func (t *TensorRTSpec) ApplyDefaults(config *PredictorsConfig)
- func (in *TensorRTSpec) DeepCopy() *TensorRTSpec
- func (in *TensorRTSpec) DeepCopyInto(out *TensorRTSpec)
- func (t *TensorRTSpec) GetContainer(modelName string, config *PredictorsConfig) *v1.Container
- func (t *TensorRTSpec) GetStorageUri() string
- func (t *TensorRTSpec) Validate(config *PredictorsConfig) error
- type TensorflowSpec
- func (t *TensorflowSpec) ApplyDefaults(config *PredictorsConfig)
- func (in *TensorflowSpec) DeepCopy() *TensorflowSpec
- func (in *TensorflowSpec) DeepCopyInto(out *TensorflowSpec)
- func (t *TensorflowSpec) GetContainer(modelName string, config *PredictorsConfig) *v1.Container
- func (t *TensorflowSpec) GetStorageUri() string
- func (t *TensorflowSpec) Validate(config *PredictorsConfig) error
- type Transformer
- type TransformerConfig
- type TransformerSpec
- func (t *TransformerSpec) ApplyDefaults(config *TransformersConfig)
- func (in *TransformerSpec) DeepCopy() *TransformerSpec
- func (in *TransformerSpec) DeepCopyInto(out *TransformerSpec)
- func (t *TransformerSpec) GetContainerSpec(metadata metav1.ObjectMeta, isCanary bool) *v1.Container
- func (t *TransformerSpec) Validate(config *TransformersConfig) error
- type TransformersConfig
- type VirtualServiceStatus
- type XGBoostSpec
- func (x *XGBoostSpec) ApplyDefaults(config *PredictorsConfig)
- func (in *XGBoostSpec) DeepCopy() *XGBoostSpec
- func (in *XGBoostSpec) DeepCopyInto(out *XGBoostSpec)
- func (x *XGBoostSpec) GetContainer(modelName string, config *PredictorsConfig) *v1.Container
- func (x *XGBoostSpec) GetStorageUri() string
- func (x *XGBoostSpec) Validate(config *PredictorsConfig) error
Constants ¶
const ( // RoutesReady is set when network configuration has completed. RoutesReady apis.ConditionType = "RoutesReady" // DefaultPredictorReady is set when default predictor has reported readiness. DefaultPredictorReady apis.ConditionType = "DefaultPredictorReady" // CanaryPredictorReady is set when canary predictor has reported readiness. CanaryPredictorReady apis.ConditionType = "CanaryPredictorReady" // DefaultTransformerReady is set when default transformer has reported readiness. DefaultTransformerReady apis.ConditionType = "DefaultTransformerReady" // CanaryTransformerReady is set when canary transformer has reported readiness. CanaryTransformerReady apis.ConditionType = "CanaryTransformerReady" // DefaultExplainerReady is set when default explainer has reported readiness. DefaultExplainerReady apis.ConditionType = "DefaultExplainerReady" // CanaryExplainerReady is set when canary explainer has reported readiness. CanaryExplainerReady apis.ConditionType = "CanaryExplainerReady" )
ConditionType represents a Service condition value
const ( MinReplicasShouldBeLessThanMaxError = "MinReplicas cannot be greater than MaxReplicas." MinReplicasLowerBoundExceededError = "MinReplicas cannot be less than 0." MaxReplicasLowerBoundExceededError = "MaxReplicas cannot be less than 0." TrafficBoundsExceededError = "TrafficPercent must be between [0, 100]." TrafficProvidedWithoutCanaryError = "Canary must be specified when CanaryTrafficPercent > 0." UnsupportedStorageURIFormatError = "" /* 156-byte string literal not displayed */ )
Known error messages
const (
// ExactlyOneExplainerViolatedError is a known error message
ExactlyOneExplainerViolatedError = "Exactly one of [Custom, Alibi] must be specified in ExplainerSpec"
)
const (
// ExactlyOnePredictorViolatedError is a known error message
ExactlyOnePredictorViolatedError = "Exactly one of [Custom, ONNX, Tensorflow, TensorRT, SKLearn, XGBoost] must be specified in PredictorSpec"
)
const (
ExactlyOneTransformerViolatedError = "Exactly one of [Custom, Feast] must be specified in TransformerSpec"
)
Constants
Variables ¶
var ( AlibiImageName = "docker.io/seldonio/alibiexplainer" InvalidAlibiRuntimeVersionError = "RuntimeVersion must be one of %s" )
var ( ONNXServingRestPort = "8080" ONNXServingGRPCPort = "9000" ONNXServingImageName = "mcr.microsoft.com/onnxruntime/server" ONNXModelFileName = "model.onnx" InvalidONNXRuntimeVersionError = "ONNX RuntimeVersion must be one of %s" )
var ( InvalidPyTorchRuntimeVersionError = "RuntimeVersion must be one of %s" PyTorchServerImageName = "gcr.io/kfserving/pytorchserver" DefaultPyTorchModelClassName = "PyTorchModel" )
var ( AllowedSKLearnRuntimeVersions = []string{ "latest", "v0.1.2", } InvalidSKLearnRuntimeVersionError = "RuntimeVersion must be one of %s" SKLearnServerImageName = "gcr.io/kfserving/sklearnserver" )
TODO add image name to to configmap
var ( TensorflowEntrypointCommand = "/usr/bin/tensorflow_model_server" TensorflowServingGRPCPort = "9000" TensorflowServingRestPort = "8080" TensorflowServingImageName = "tensorflow/serving" TensorflowServingGPUSuffix = "-gpu" InvalidTensorflowRuntimeVersionError = "RuntimeVersion must be one of %s" InvalidTensorflowRuntimeIncludesGPU = "RuntimeVersion is not GPU enabled but GPU resources are requested. " + InvalidTensorflowRuntimeVersionError InvalidTensorflowRuntimeExcludesGPU = "RuntimeVersion is GPU enabled but GPU resources are not requested. " + InvalidTensorflowRuntimeVersionError )
var ( DefaultTensorRTISImageName = "nvcr.io/nvidia/tensorrtserver" InvalidTensorRTISRuntimeVersionError = "RuntimeVersion must be one of %s" TensorRTISGRPCPort = int32(9000) TensorRTISRestPort = int32(8080) )
var ( InvalidXGBoostRuntimeVersionError = "RuntimeVersion must be one of %s" XGBoostServerImageName = "gcr.io/kfserving/xgbserver" )
var ( SupportedStorageURIPrefixList = []string{"gs://", "s3://", "pvc://", "file://"} AzureBlobURIRegEx = "https://(.+?).blob.core.windows.net/(.+)" )
var ( DefaultMemory = resource.MustParse("2Gi") DefaultCPU = resource.MustParse("1") )
var ( // APIVersion is the current API version used to register these objects APIVersion = "v1alpha2" // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: constants.KFServingAPIGroupName, Version: APIVersion} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme is required by pkg/client/... AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/client/listers/...
Types ¶
type AlibiExplainerSpec ¶
type AlibiExplainerSpec struct { // The type of Alibi explainer Type AlibiExplainerType `json:"type"` // The location of a trained explanation model StorageURI string `json:"storageUri,omitempty"` // Defaults to latest Alibi Version RuntimeVersion string `json:"runtimeVersion,omitempty"` // Defaults to requests and limits of 1CPU, 2Gb MEM. Resources v1.ResourceRequirements `json:"resources,omitempty"` // Inline custom parameter settings for explainer Config map[string]string `json:"config,omitempty"` }
AlibiExplainerSpec defines the arguments for configuring an Alibi Explanation Server
func (*AlibiExplainerSpec) ApplyExplainerDefaults ¶
func (s *AlibiExplainerSpec) ApplyExplainerDefaults(config *ExplainersConfig)
func (*AlibiExplainerSpec) CreateExplainerContainer ¶
func (s *AlibiExplainerSpec) CreateExplainerContainer(modelName string, predictorHost string, config *ExplainersConfig) *v1.Container
func (*AlibiExplainerSpec) DeepCopy ¶
func (in *AlibiExplainerSpec) DeepCopy() *AlibiExplainerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibiExplainerSpec.
func (*AlibiExplainerSpec) DeepCopyInto ¶
func (in *AlibiExplainerSpec) DeepCopyInto(out *AlibiExplainerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AlibiExplainerSpec) GetStorageUri ¶
func (s *AlibiExplainerSpec) GetStorageUri() string
func (*AlibiExplainerSpec) ValidateExplainer ¶
func (s *AlibiExplainerSpec) ValidateExplainer(config *ExplainersConfig) error
type AlibiExplainerType ¶
type AlibiExplainerType string
const ( AlibiAnchorsTabularExplainer AlibiExplainerType = "AnchorTabular" AlibiAnchorsImageExplainer AlibiExplainerType = "AnchorImages" AlibiAnchorsTextExplainer AlibiExplainerType = "AnchorText" AlibiCounterfactualsExplainer AlibiExplainerType = "Counterfactuals" AlibiContrastiveExplainer AlibiExplainerType = "Contrastive" )
type CustomSpec ¶
CustomSpec provides a hook for arbitrary container configuration.
func (*CustomSpec) ApplyDefaults ¶
func (c *CustomSpec) ApplyDefaults(config *PredictorsConfig)
func (*CustomSpec) ApplyExplainerDefaults ¶
func (c *CustomSpec) ApplyExplainerDefaults(config *ExplainersConfig)
func (*CustomSpec) ApplyTransformerDefaults ¶
func (c *CustomSpec) ApplyTransformerDefaults(config *TransformersConfig)
func (*CustomSpec) CreateExplainerContainer ¶
func (c *CustomSpec) CreateExplainerContainer(modelName string, predictUrl string, config *ExplainersConfig) *v1.Container
func (*CustomSpec) DeepCopy ¶
func (in *CustomSpec) DeepCopy() *CustomSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomSpec.
func (*CustomSpec) DeepCopyInto ¶
func (in *CustomSpec) DeepCopyInto(out *CustomSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CustomSpec) GetContainer ¶
func (c *CustomSpec) GetContainer(modelName string, config *PredictorsConfig) *v1.Container
func (*CustomSpec) GetContainerSpec ¶
func (c *CustomSpec) GetContainerSpec() *v1.Container
GetContainerSpec for the CustomSpec
func (*CustomSpec) GetStorageUri ¶
func (c *CustomSpec) GetStorageUri() string
func (*CustomSpec) Validate ¶
func (c *CustomSpec) Validate(config *PredictorsConfig) error
func (*CustomSpec) ValidateExplainer ¶
func (c *CustomSpec) ValidateExplainer(config *ExplainersConfig) error
func (*CustomSpec) ValidateTransformer ¶
func (c *CustomSpec) ValidateTransformer(config *TransformersConfig) error
type DeploymentSpec ¶
type DeploymentSpec struct { // ServiceAccountName is the name of the ServiceAccount to use to run the service // +optional ServiceAccountName string `json:"serviceAccountName,omitempty"` // Minimum number of replicas, pods won't scale down to 0 in case of no traffic // +optional MinReplicas int `json:"minReplicas,omitempty"` // This is the up bound for autoscaler to scale to // +optional MaxReplicas int `json:"maxReplicas,omitempty"` }
DeploymentSpec defines the configuration for a given InferenceService service component
func (*DeploymentSpec) DeepCopy ¶
func (in *DeploymentSpec) DeepCopy() *DeploymentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentSpec.
func (*DeploymentSpec) DeepCopyInto ¶
func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EndpointSpec ¶
type EndpointSpec struct { // Predictor defines the model serving spec // +required Predictor PredictorSpec `json:"predictor"` // Explainer defines the model explanation service spec, // explainer service calls to predictor or transformer if it is specified. // +optional Explainer *ExplainerSpec `json:"explainer,omitempty"` // Transformer defines the pre/post processing before and after the predictor call, // transformer service calls to predictor service. // +optional Transformer *TransformerSpec `json:"transformer,omitempty"` }
func (*EndpointSpec) DeepCopy ¶
func (in *EndpointSpec) DeepCopy() *EndpointSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSpec.
func (*EndpointSpec) DeepCopyInto ¶
func (in *EndpointSpec) DeepCopyInto(out *EndpointSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EndpointStatusMap ¶
type EndpointStatusMap map[constants.InferenceServiceEndpoint]*StatusConfigurationSpec
EndpointStatusMap defines the observed state of InferenceService endpoints
func (EndpointStatusMap) DeepCopy ¶
func (in EndpointStatusMap) DeepCopy() EndpointStatusMap
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointStatusMap.
func (EndpointStatusMap) DeepCopyInto ¶
func (in EndpointStatusMap) DeepCopyInto(out *EndpointStatusMap)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Explainer ¶
type Explainer interface { GetStorageUri() string CreateExplainerContainer(modelName string, predictorHost string, config *ExplainersConfig) *v1.Container ApplyExplainerDefaults(config *ExplainersConfig) ValidateExplainer(config *ExplainersConfig) error }
type ExplainerConfig ¶
type ExplainerConfig struct { ContainerImage string `json:"image"` DefaultImageVersion string `json:"defaultImageVersion"` AllowedImageVersions []string `json:"allowedImageVersions"` }
+k8s:openapi-gen=false
func (*ExplainerConfig) DeepCopy ¶
func (in *ExplainerConfig) DeepCopy() *ExplainerConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExplainerConfig.
func (*ExplainerConfig) DeepCopyInto ¶
func (in *ExplainerConfig) DeepCopyInto(out *ExplainerConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExplainerSpec ¶
type ExplainerSpec struct { // Spec for alibi explainer Alibi *AlibiExplainerSpec `json:"alibi,omitempty"` // Spec for a custom explainer Custom *CustomSpec `json:"custom,omitempty"` DeploymentSpec `json:",inline"` }
ExplainerSpec defines the arguments for a model explanation server, The following fields follow a "1-of" semantic. Users must specify exactly one spec.
func (*ExplainerSpec) ApplyDefaults ¶
func (e *ExplainerSpec) ApplyDefaults(config *ExplainersConfig)
func (*ExplainerSpec) CreateExplainerContainer ¶
func (e *ExplainerSpec) CreateExplainerContainer(modelName string, predictorHost string, config *ExplainersConfig) *v1.Container
func (*ExplainerSpec) DeepCopy ¶
func (in *ExplainerSpec) DeepCopy() *ExplainerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExplainerSpec.
func (*ExplainerSpec) DeepCopyInto ¶
func (in *ExplainerSpec) DeepCopyInto(out *ExplainerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ExplainerSpec) GetStorageUri ¶
func (e *ExplainerSpec) GetStorageUri() string
Returns a URI to the explainer. This URI is passed to the model-initializer via the ModelInitializerSourceUriInternalAnnotationKey
func (*ExplainerSpec) Validate ¶
func (e *ExplainerSpec) Validate(config *ExplainersConfig) error
type ExplainersConfig ¶
type ExplainersConfig struct {
AlibiExplainer ExplainerConfig `json:"alibi,omitempty"`
}
+k8s:openapi-gen=false
func GetExplainerConfigs ¶
func GetExplainerConfigs(configMap *v1.ConfigMap) (*ExplainersConfig, error)
func (*ExplainersConfig) DeepCopy ¶
func (in *ExplainersConfig) DeepCopy() *ExplainersConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExplainersConfig.
func (*ExplainersConfig) DeepCopyInto ¶
func (in *ExplainersConfig) DeepCopyInto(out *ExplainersConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InferenceService ¶
type InferenceService struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec InferenceServiceSpec `json:"spec,omitempty"` Status InferenceServiceStatus `json:"status,omitempty"` }
InferenceService is the Schema for the services API +k8s:openapi-gen=true +kubebuilder:printcolumn:name="URL",type="string",JSONPath=".status.url" +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="Default Traffic",type="integer",JSONPath=".status.traffic" +kubebuilder:printcolumn:name="Canary Traffic",type="integer",JSONPath=".status.canaryTraffic" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:path=inferenceservices,shortName=inferenceservice
func (*InferenceService) DeepCopy ¶
func (in *InferenceService) DeepCopy() *InferenceService
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InferenceService.
func (*InferenceService) DeepCopyInto ¶
func (in *InferenceService) DeepCopyInto(out *InferenceService)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InferenceService) DeepCopyObject ¶
func (in *InferenceService) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*InferenceService) Default ¶
func (isvc *InferenceService) Default(client client.Client)
func (*InferenceService) ValidateCreate ¶
func (isvc *InferenceService) ValidateCreate(client client.Client) error
ValidateCreate implements https://godoc.org/sigs.k8s.io/controller-runtime/pkg/webhook/admission#Validator
func (*InferenceService) ValidateUpdate ¶
ValidateUpdate implements https://godoc.org/sigs.k8s.io/controller-runtime/pkg/webhook/admission#Validator
type InferenceServiceList ¶
type InferenceServiceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []InferenceService `json:"items"` }
InferenceServiceList contains a list of Service
func (*InferenceServiceList) DeepCopy ¶
func (in *InferenceServiceList) DeepCopy() *InferenceServiceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InferenceServiceList.
func (*InferenceServiceList) DeepCopyInto ¶
func (in *InferenceServiceList) DeepCopyInto(out *InferenceServiceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InferenceServiceList) DeepCopyObject ¶
func (in *InferenceServiceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InferenceServiceSpec ¶
type InferenceServiceSpec struct { // Default defines default InferenceService endpoints // +required Default EndpointSpec `json:"default"` // Canary defines an alternate endpoints to route a percentage of traffic. // +optional Canary *EndpointSpec `json:"canary,omitempty"` // CanaryTrafficPercent defines the percentage of traffic going to canary InferenceService endpoints // +optional CanaryTrafficPercent int `json:"canaryTrafficPercent,omitempty"` }
InferenceServiceSpec defines the desired state of InferenceService
func (*InferenceServiceSpec) DeepCopy ¶
func (in *InferenceServiceSpec) DeepCopy() *InferenceServiceSpec
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 InferenceServiceStatus ¶
type InferenceServiceStatus struct { duckv1beta1.Status `json:",inline"` // URL of the KFService URL string `json:"url,omitempty"` // Traffic percentage that goes to default services Traffic int `json:"traffic,omitempty"` // Traffic percentage that goes to canary services CanaryTraffic int `json:"canaryTraffic,omitempty"` // Statuses for the default endpoints of the KFService Default *EndpointStatusMap `json:"default,omitempty"` // Statuses for the canary endpoints of the KFService Canary *EndpointStatusMap `json:"canary,omitempty"` }
InferenceServiceStatus defines the observed state of InferenceService
func (*InferenceServiceStatus) DeepCopy ¶
func (in *InferenceServiceStatus) DeepCopy() *InferenceServiceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InferenceServiceStatus.
func (*InferenceServiceStatus) DeepCopyInto ¶
func (in *InferenceServiceStatus) DeepCopyInto(out *InferenceServiceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InferenceServiceStatus) GetCondition ¶
func (ss *InferenceServiceStatus) GetCondition(t apis.ConditionType) *apis.Condition
GetCondition returns the condition by name.
func (*InferenceServiceStatus) InitializeConditions ¶
func (ss *InferenceServiceStatus) InitializeConditions()
func (*InferenceServiceStatus) IsReady ¶
func (ss *InferenceServiceStatus) IsReady() bool
IsReady returns if the service is ready to serve the requested configuration.
func (*InferenceServiceStatus) PropagateCanaryStatus ¶
func (ss *InferenceServiceStatus) PropagateCanaryStatus(endpoint constants.InferenceServiceEndpoint, canaryStatus *knservingv1alpha1.ServiceStatus)
PropagateCanaryStatus propagates the status for the canary spec
func (*InferenceServiceStatus) PropagateDefaultStatus ¶
func (ss *InferenceServiceStatus) PropagateDefaultStatus(endpoint constants.InferenceServiceEndpoint, defaultStatus *knservingv1alpha1.ServiceStatus)
PropagateDefaultStatus propagates the status for the default spec
func (*InferenceServiceStatus) PropagateRouteStatus ¶
func (ss *InferenceServiceStatus) PropagateRouteStatus(vs *VirtualServiceStatus)
PropagateRouteStatus propagates route's status to the service's status.
type ONNXSpec ¶
type ONNXSpec struct { // The location of the trained model StorageURI string `json:"storageUri"` // Allowed runtime versions are [v0.5.0, latest] and defaults to the version specified in kfservice config map RuntimeVersion string `json:"runtimeVersion,omitempty"` // Defaults to requests and limits of 1CPU, 2Gb MEM. Resources v1.ResourceRequirements `json:"resources,omitempty"` }
ONNXSpec defines arguments for configuring ONNX model serving.
func (*ONNXSpec) ApplyDefaults ¶
func (s *ONNXSpec) ApplyDefaults(config *PredictorsConfig)
func (*ONNXSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ONNXSpec.
func (*ONNXSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ONNXSpec) GetContainer ¶
func (s *ONNXSpec) GetContainer(modelName string, config *PredictorsConfig) *v1.Container
func (*ONNXSpec) GetStorageUri ¶
func (*ONNXSpec) Validate ¶
func (s *ONNXSpec) Validate(config *PredictorsConfig) error
type Predictor ¶
type Predictor interface { GetStorageUri() string GetContainer(modelName string, config *PredictorsConfig) *v1.Container ApplyDefaults(config *PredictorsConfig) Validate(config *PredictorsConfig) error }
type PredictorConfig ¶
type PredictorConfig struct { ContainerImage string `json:"image"` DefaultImageVersion string `json:"defaultImageVersion"` DefaultGpuImageVersion string `json:"defaultGpuImageVersion"` AllowedImageVersions []string `json:"allowedImageVersions"` }
+k8s:openapi-gen=false
func (*PredictorConfig) DeepCopy ¶
func (in *PredictorConfig) DeepCopy() *PredictorConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PredictorConfig.
func (*PredictorConfig) DeepCopyInto ¶
func (in *PredictorConfig) DeepCopyInto(out *PredictorConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PredictorSpec ¶
type PredictorSpec struct { // Spec for a custom predictor Custom *CustomSpec `json:"custom,omitempty"` // Spec for Tensorflow Serving (https://github.com/tensorflow/serving) Tensorflow *TensorflowSpec `json:"tensorflow,omitempty"` // Spec for TensorRT Inference Server (https://github.com/NVIDIA/tensorrt-inference-server) TensorRT *TensorRTSpec `json:"tensorrt,omitempty"` // Spec for XGBoost predictor XGBoost *XGBoostSpec `json:"xgboost,omitempty"` // Spec for SKLearn predictor SKLearn *SKLearnSpec `json:"sklearn,omitempty"` // Spec for ONNX runtime (https://github.com/microsoft/onnxruntime) ONNX *ONNXSpec `json:"onnx,omitempty"` // Spec for PyTorch predictor PyTorch *PyTorchSpec `json:"pytorch,omitempty"` DeploymentSpec `json:",inline"` }
PredictorSpec defines the configuration for a predictor, The following fields follow a "1-of" semantic. Users must specify exactly one spec.
func (*PredictorSpec) ApplyDefaults ¶
func (p *PredictorSpec) ApplyDefaults(config *PredictorsConfig)
func (*PredictorSpec) DeepCopy ¶
func (in *PredictorSpec) DeepCopy() *PredictorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PredictorSpec.
func (*PredictorSpec) DeepCopyInto ¶
func (in *PredictorSpec) DeepCopyInto(out *PredictorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PredictorSpec) GetContainer ¶
func (p *PredictorSpec) GetContainer(modelName string, config *PredictorsConfig) *v1.Container
func (*PredictorSpec) GetStorageUri ¶
func (p *PredictorSpec) GetStorageUri() string
Returns a URI to the model. This URI is passed to the storage-initializer via the StorageInitializerSourceUriInternalAnnotationKey
func (*PredictorSpec) Validate ¶
func (p *PredictorSpec) Validate(config *PredictorsConfig) error
type PredictorsConfig ¶
type PredictorsConfig struct { Tensorflow PredictorConfig `json:"tensorflow,omitempty"` TensorRT PredictorConfig `json:"tensorrt,omitempty"` Xgboost PredictorConfig `json:"xgboost,omitempty"` SKlearn PredictorConfig `json:"sklearn,omitempty"` PyTorch PredictorConfig `json:"pytorch,omitempty"` ONNX PredictorConfig `json:"onnx,omitempty"` }
+k8s:openapi-gen=false
func GetPredictorConfigs ¶
func GetPredictorConfigs(configMap *v1.ConfigMap) (*PredictorsConfig, error)
func (*PredictorsConfig) DeepCopy ¶
func (in *PredictorsConfig) DeepCopy() *PredictorsConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PredictorsConfig.
func (*PredictorsConfig) DeepCopyInto ¶
func (in *PredictorsConfig) DeepCopyInto(out *PredictorsConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PyTorchSpec ¶
type PyTorchSpec struct { // The location of the trained model StorageURI string `json:"storageUri"` // Defaults PyTorch model class name to 'PyTorchModel' ModelClassName string `json:"modelClassName,omitempty"` // Allowed runtime versions are [0.2.0, latest] and defaults to the version specified in kfservice config map RuntimeVersion string `json:"runtimeVersion,omitempty"` // Defaults to requests and limits of 1CPU, 2Gb MEM. Resources v1.ResourceRequirements `json:"resources,omitempty"` }
PyTorchSpec defines arguments for configuring PyTorch model serving.
func (*PyTorchSpec) ApplyDefaults ¶
func (s *PyTorchSpec) ApplyDefaults(config *PredictorsConfig)
func (*PyTorchSpec) DeepCopy ¶
func (in *PyTorchSpec) DeepCopy() *PyTorchSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PyTorchSpec.
func (*PyTorchSpec) DeepCopyInto ¶
func (in *PyTorchSpec) DeepCopyInto(out *PyTorchSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PyTorchSpec) GetContainer ¶
func (s *PyTorchSpec) GetContainer(modelName string, config *PredictorsConfig) *v1.Container
func (*PyTorchSpec) GetStorageUri ¶
func (s *PyTorchSpec) GetStorageUri() string
func (*PyTorchSpec) Validate ¶
func (s *PyTorchSpec) Validate(config *PredictorsConfig) error
type SKLearnSpec ¶
type SKLearnSpec struct { // The location of the trained model StorageURI string `json:"storageUri"` // Allowed runtime versions are [0.2.0, latest] and defaults to the version specified in kfservice config map RuntimeVersion string `json:"runtimeVersion,omitempty"` // Defaults to requests and limits of 1CPU, 2Gb MEM. Resources v1.ResourceRequirements `json:"resources,omitempty"` }
SKLearnSpec defines arguments for configuring SKLearn model serving.
func (*SKLearnSpec) ApplyDefaults ¶
func (s *SKLearnSpec) ApplyDefaults(config *PredictorsConfig)
func (*SKLearnSpec) DeepCopy ¶
func (in *SKLearnSpec) DeepCopy() *SKLearnSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SKLearnSpec.
func (*SKLearnSpec) DeepCopyInto ¶
func (in *SKLearnSpec) DeepCopyInto(out *SKLearnSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SKLearnSpec) GetContainer ¶
func (s *SKLearnSpec) GetContainer(modelName string, config *PredictorsConfig) *v1.Container
func (*SKLearnSpec) GetStorageUri ¶
func (s *SKLearnSpec) GetStorageUri() string
func (*SKLearnSpec) Validate ¶
func (s *SKLearnSpec) Validate(config *PredictorsConfig) error
type StatusConfigurationSpec ¶
type StatusConfigurationSpec struct { // Latest revision name that is in ready state Name string `json:"name,omitempty"` // Host name of the service Hostname string `json:"host,omitempty"` Replicas int `json:"replicas,omitempty"` }
StatusConfigurationSpec describes the state of the configuration receiving traffic.
func (*StatusConfigurationSpec) DeepCopy ¶
func (in *StatusConfigurationSpec) DeepCopy() *StatusConfigurationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusConfigurationSpec.
func (*StatusConfigurationSpec) DeepCopyInto ¶
func (in *StatusConfigurationSpec) DeepCopyInto(out *StatusConfigurationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TensorRTSpec ¶
type TensorRTSpec struct { // The location of the trained model StorageURI string `json:"storageUri"` // Allowed runtime versions are [19.05-py3] and defaults to the version specified in kfservice config map RuntimeVersion string `json:"runtimeVersion,omitempty"` // Defaults to requests and limits of 1CPU, 2Gb MEM. Resources v1.ResourceRequirements `json:"resources,omitempty"` }
TensorRTSpec defines arguments for configuring TensorRT model serving.
func (*TensorRTSpec) ApplyDefaults ¶
func (t *TensorRTSpec) ApplyDefaults(config *PredictorsConfig)
func (*TensorRTSpec) DeepCopy ¶
func (in *TensorRTSpec) DeepCopy() *TensorRTSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TensorRTSpec.
func (*TensorRTSpec) DeepCopyInto ¶
func (in *TensorRTSpec) DeepCopyInto(out *TensorRTSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TensorRTSpec) GetContainer ¶
func (t *TensorRTSpec) GetContainer(modelName string, config *PredictorsConfig) *v1.Container
func (*TensorRTSpec) GetStorageUri ¶
func (t *TensorRTSpec) GetStorageUri() string
func (*TensorRTSpec) Validate ¶
func (t *TensorRTSpec) Validate(config *PredictorsConfig) error
type TensorflowSpec ¶
type TensorflowSpec struct { // The location of the trained model StorageURI string `json:"storageUri"` // Allowed runtime versions are [1.11.0, 1.12.0, 1.13.0, 1.14.0, latest] or [1.11.0-gpu, 1.12.0-gpu, 1.13.0-gpu, 1.14.0-gpu, latest-gpu] // if gpu resource is specified and defaults to the version specified in kfservice config map. RuntimeVersion string `json:"runtimeVersion,omitempty"` // Defaults to requests and limits of 1CPU, 2Gb MEM. Resources v1.ResourceRequirements `json:"resources,omitempty"` }
TensorflowSpec defines arguments for configuring Tensorflow model serving.
func (*TensorflowSpec) ApplyDefaults ¶
func (t *TensorflowSpec) ApplyDefaults(config *PredictorsConfig)
func (*TensorflowSpec) DeepCopy ¶
func (in *TensorflowSpec) DeepCopy() *TensorflowSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TensorflowSpec.
func (*TensorflowSpec) DeepCopyInto ¶
func (in *TensorflowSpec) DeepCopyInto(out *TensorflowSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TensorflowSpec) GetContainer ¶
func (t *TensorflowSpec) GetContainer(modelName string, config *PredictorsConfig) *v1.Container
func (*TensorflowSpec) GetStorageUri ¶
func (t *TensorflowSpec) GetStorageUri() string
func (*TensorflowSpec) Validate ¶
func (t *TensorflowSpec) Validate(config *PredictorsConfig) error
type Transformer ¶
type Transformer interface { GetContainerSpec() *v1.Container ApplyTransformerDefaults(config *TransformersConfig) ValidateTransformer(config *TransformersConfig) error }
Transformer interface is implemented by all Transformers
type TransformerConfig ¶
type TransformerConfig struct { ContainerImage string `json:"image"` DefaultImageVersion string `json:"defaultImageVersion"` AllowedImageVersions []string `json:"allowedImageVersions"` }
+k8s:openapi-gen=false
func (*TransformerConfig) DeepCopy ¶
func (in *TransformerConfig) DeepCopy() *TransformerConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TransformerConfig.
func (*TransformerConfig) DeepCopyInto ¶
func (in *TransformerConfig) DeepCopyInto(out *TransformerConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TransformerSpec ¶
type TransformerSpec struct { // Spec for a custom transformer Custom *CustomSpec `json:"custom,omitempty"` DeploymentSpec `json:",inline"` }
TransformerSpec defines transformer service for pre/post processing
func (*TransformerSpec) ApplyDefaults ¶
func (t *TransformerSpec) ApplyDefaults(config *TransformersConfig)
ApplyDefaults to the TransformerSpec
func (*TransformerSpec) DeepCopy ¶
func (in *TransformerSpec) DeepCopy() *TransformerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TransformerSpec.
func (*TransformerSpec) DeepCopyInto ¶
func (in *TransformerSpec) DeepCopyInto(out *TransformerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TransformerSpec) GetContainerSpec ¶
func (t *TransformerSpec) GetContainerSpec(metadata metav1.ObjectMeta, isCanary bool) *v1.Container
GetContainerSpec for the transformer
func (*TransformerSpec) Validate ¶
func (t *TransformerSpec) Validate(config *TransformersConfig) error
Validate the TransformerSpec
type TransformersConfig ¶
type TransformersConfig struct {
Feast TransformerConfig `json:"feast,omitempty"`
}
+k8s:openapi-gen=false
func GetTransformerConfigs ¶
func GetTransformerConfigs(configMap *v1.ConfigMap) (*TransformersConfig, error)
func (*TransformersConfig) DeepCopy ¶
func (in *TransformersConfig) DeepCopy() *TransformersConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TransformersConfig.
func (*TransformersConfig) DeepCopyInto ¶
func (in *TransformersConfig) DeepCopyInto(out *TransformersConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualServiceStatus ¶
type VirtualServiceStatus struct { URL string CanaryWeight int DefaultWeight int duckv1beta1.Status }
+k8s:openapi-gen=false
VirtualServiceStatus captures the status of the virtual service
func (*VirtualServiceStatus) DeepCopy ¶
func (in *VirtualServiceStatus) DeepCopy() *VirtualServiceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServiceStatus.
func (*VirtualServiceStatus) DeepCopyInto ¶
func (in *VirtualServiceStatus) DeepCopyInto(out *VirtualServiceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type XGBoostSpec ¶
type XGBoostSpec struct { // The location of the trained model StorageURI string `json:"storageUri"` // Allowed runtime versions are [0.2.0, latest] and defaults to the version specified in kfservice config map RuntimeVersion string `json:"runtimeVersion,omitempty"` // Defaults to requests and limits of 1CPU, 2Gb MEM. Resources v1.ResourceRequirements `json:"resources,omitempty"` }
XGBoostSpec defines arguments for configuring XGBoost model serving.
func (*XGBoostSpec) ApplyDefaults ¶
func (x *XGBoostSpec) ApplyDefaults(config *PredictorsConfig)
func (*XGBoostSpec) DeepCopy ¶
func (in *XGBoostSpec) DeepCopy() *XGBoostSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XGBoostSpec.
func (*XGBoostSpec) DeepCopyInto ¶
func (in *XGBoostSpec) DeepCopyInto(out *XGBoostSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*XGBoostSpec) GetContainer ¶
func (x *XGBoostSpec) GetContainer(modelName string, config *PredictorsConfig) *v1.Container
func (*XGBoostSpec) GetStorageUri ¶
func (x *XGBoostSpec) GetStorageUri() string
func (*XGBoostSpec) Validate ¶
func (x *XGBoostSpec) Validate(config *PredictorsConfig) error
Source Files
¶
- configmap.go
- doc.go
- explainer.go
- explainer_alibi.go
- framework_custom.go
- framework_onnx.go
- framework_pytorch.go
- framework_scikit.go
- framework_tensorflow.go
- framework_tensorrt.go
- framework_xgboost.go
- inferenceservice_defaults.go
- inferenceservice_status.go
- inferenceservice_types.go
- inferenceservice_validation.go
- openapi_generated.go
- predictor.go
- register.go
- transformer.go
- transformer_custom.go
- zz_generated.deepcopy.go