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 GetIntReference(number int) *int
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- func Resource(resource string) schema.GroupResource
- type AIXExplainerSpec
- func (s *AIXExplainerSpec) ApplyDefaults(config *InferenceServicesConfig)
- func (s *AIXExplainerSpec) CreateExplainerContainer(modelName string, parallelism int, predictorHost string, ...) *v1.Container
- func (in *AIXExplainerSpec) DeepCopy() *AIXExplainerSpec
- func (in *AIXExplainerSpec) DeepCopyInto(out *AIXExplainerSpec)
- func (s *AIXExplainerSpec) GetResourceRequirements() *v1.ResourceRequirements
- func (s *AIXExplainerSpec) GetStorageUri() string
- func (s *AIXExplainerSpec) Validate(config *InferenceServicesConfig) error
- type AIXExplainerType
- type AlibiExplainerSpec
- func (s *AlibiExplainerSpec) ApplyDefaults(config *InferenceServicesConfig)
- func (s *AlibiExplainerSpec) CreateExplainerContainer(modelName string, parallelism int, predictorHost string, ...) *v1.Container
- func (in *AlibiExplainerSpec) DeepCopy() *AlibiExplainerSpec
- func (in *AlibiExplainerSpec) DeepCopyInto(out *AlibiExplainerSpec)
- func (s *AlibiExplainerSpec) GetResourceRequirements() *v1.ResourceRequirements
- func (s *AlibiExplainerSpec) GetStorageUri() string
- func (s *AlibiExplainerSpec) Validate(config *InferenceServicesConfig) error
- type AlibiExplainerType
- type Batcher
- type ComponentStatusMap
- type CustomSpec
- func (c *CustomSpec) ApplyDefaults(config *InferenceServicesConfig)
- func (c *CustomSpec) CreateExplainerContainer(modelName string, parallelism int, predictUrl string, ...) *v1.Container
- func (in *CustomSpec) DeepCopy() *CustomSpec
- func (in *CustomSpec) DeepCopyInto(out *CustomSpec)
- func (c *CustomSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
- func (c *CustomSpec) GetContainerSpec() *v1.Container
- func (c *CustomSpec) GetResourceRequirements() *v1.ResourceRequirements
- func (c *CustomSpec) GetStorageUri() string
- func (c *CustomSpec) Validate(config *InferenceServicesConfig) error
- type DeploymentSpec
- type EndpointSpec
- type Explainer
- type ExplainerConfig
- type ExplainerSpec
- func (e *ExplainerSpec) ApplyDefaults(config *InferenceServicesConfig)
- func (e *ExplainerSpec) CreateExplainerContainer(modelName string, parallelism int, predictorHost string, ...) *v1.Container
- func (in *ExplainerSpec) DeepCopy() *ExplainerSpec
- func (in *ExplainerSpec) DeepCopyInto(out *ExplainerSpec)
- func (e *ExplainerSpec) GetStorageUri() string
- func (e *ExplainerSpec) Validate(config *InferenceServicesConfig) error
- type ExplainersConfig
- type InferenceService
- func (dst *InferenceService) ConvertFrom(srcRaw conversion.Hub) error
- func (src *InferenceService) ConvertTo(dstRaw conversion.Hub) error
- func (in *InferenceService) DeepCopy() *InferenceService
- func (in *InferenceService) DeepCopyInto(out *InferenceService)
- func (in *InferenceService) DeepCopyObject() runtime.Object
- func (isvc *InferenceService) Default()
- func (isvc *InferenceService) ValidateCreate() error
- func (isvc *InferenceService) ValidateDelete() error
- func (isvc *InferenceService) ValidateUpdate(old runtime.Object) error
- type InferenceServiceList
- type InferenceServiceSpec
- type InferenceServiceState
- 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(component constants.InferenceServiceComponent, ...)
- func (ss *InferenceServiceStatus) PropagateDefaultStatus(component constants.InferenceServiceComponent, ...)
- func (ss *InferenceServiceStatus) PropagateRouteStatus(vs *VirtualServiceStatus)
- type InferenceServicesConfig
- type LightGBMSpec
- func (x *LightGBMSpec) ApplyDefaults(config *InferenceServicesConfig)
- func (in *LightGBMSpec) DeepCopy() *LightGBMSpec
- func (in *LightGBMSpec) DeepCopyInto(out *LightGBMSpec)
- func (x *LightGBMSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
- func (x *LightGBMSpec) GetResourceRequirements() *v1.ResourceRequirements
- func (x *LightGBMSpec) GetStorageUri() string
- func (x *LightGBMSpec) Validate(config *InferenceServicesConfig) error
- type Logger
- type LoggerMode
- type ONNXSpec
- func (s *ONNXSpec) ApplyDefaults(config *InferenceServicesConfig)
- func (in *ONNXSpec) DeepCopy() *ONNXSpec
- func (in *ONNXSpec) DeepCopyInto(out *ONNXSpec)
- func (s *ONNXSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
- func (s *ONNXSpec) GetResourceRequirements() *v1.ResourceRequirements
- func (s *ONNXSpec) GetStorageUri() string
- func (s *ONNXSpec) Validate(config *InferenceServicesConfig) error
- type PMMLSpec
- func (s *PMMLSpec) ApplyDefaults(config *InferenceServicesConfig)
- func (in *PMMLSpec) DeepCopy() *PMMLSpec
- func (in *PMMLSpec) DeepCopyInto(out *PMMLSpec)
- func (s *PMMLSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
- func (s *PMMLSpec) GetResourceRequirements() *v1.ResourceRequirements
- func (s *PMMLSpec) GetStorageUri() string
- func (s *PMMLSpec) Validate(config *InferenceServicesConfig) error
- type Predictor
- type PredictorConfig
- type PredictorProtocols
- type PredictorSpec
- func (p *PredictorSpec) ApplyDefaults(config *InferenceServicesConfig)
- func (in *PredictorSpec) DeepCopy() *PredictorSpec
- func (in *PredictorSpec) DeepCopyInto(out *PredictorSpec)
- func (p *PredictorSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
- func (p *PredictorSpec) GetStorageUri() string
- func (p *PredictorSpec) Validate(config *InferenceServicesConfig) error
- type PredictorsConfig
- type PyTorchSpec
- func (p *PyTorchSpec) ApplyDefaults(config *InferenceServicesConfig)
- func (in *PyTorchSpec) DeepCopy() *PyTorchSpec
- func (in *PyTorchSpec) DeepCopyInto(out *PyTorchSpec)
- func (p *PyTorchSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
- func (p *PyTorchSpec) GetResourceRequirements() *v1.ResourceRequirements
- func (p *PyTorchSpec) GetStorageUri() string
- func (p *PyTorchSpec) Validate(config *InferenceServicesConfig) error
- type SKLearnSpec
- func (s *SKLearnSpec) ApplyDefaults(config *InferenceServicesConfig)
- func (in *SKLearnSpec) DeepCopy() *SKLearnSpec
- func (in *SKLearnSpec) DeepCopyInto(out *SKLearnSpec)
- func (s *SKLearnSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
- func (s *SKLearnSpec) GetResourceRequirements() *v1.ResourceRequirements
- func (s *SKLearnSpec) GetStorageUri() string
- func (s *SKLearnSpec) Validate(config *InferenceServicesConfig) error
- type StatusConfigurationSpec
- type TensorflowSpec
- func (t *TensorflowSpec) ApplyDefaults(config *InferenceServicesConfig)
- func (in *TensorflowSpec) DeepCopy() *TensorflowSpec
- func (in *TensorflowSpec) DeepCopyInto(out *TensorflowSpec)
- func (t *TensorflowSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
- func (t *TensorflowSpec) GetResourceRequirements() *v1.ResourceRequirements
- func (t *TensorflowSpec) GetStorageUri() string
- func (t *TensorflowSpec) Validate(config *InferenceServicesConfig) error
- type Transformer
- type TransformerConfig
- type TransformerSpec
- func (t *TransformerSpec) ApplyDefaults(config *InferenceServicesConfig)
- 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) GetStorageUri() string
- func (t *TransformerSpec) Validate(config *InferenceServicesConfig) error
- type TransformersConfig
- type TritonSpec
- func (t *TritonSpec) ApplyDefaults(config *InferenceServicesConfig)
- func (in *TritonSpec) DeepCopy() *TritonSpec
- func (in *TritonSpec) DeepCopyInto(out *TritonSpec)
- func (t *TritonSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
- func (t *TritonSpec) GetResourceRequirements() *v1.ResourceRequirements
- func (t *TritonSpec) GetStorageUri() string
- func (t *TritonSpec) Validate(config *InferenceServicesConfig) error
- type VirtualServiceStatus
- type XGBoostSpec
- func (x *XGBoostSpec) ApplyDefaults(config *InferenceServicesConfig)
- func (in *XGBoostSpec) DeepCopy() *XGBoostSpec
- func (in *XGBoostSpec) DeepCopyInto(out *XGBoostSpec)
- func (x *XGBoostSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
- func (x *XGBoostSpec) GetResourceRequirements() *v1.ResourceRequirements
- func (x *XGBoostSpec) GetStorageUri() string
- func (x *XGBoostSpec) Validate(config *InferenceServicesConfig) error
Constants ¶
const ( PredictorConfigKeyName = "predictors" TransformerConfigKeyName = "transformers" ExplainerConfigKeyName = "explainers" )
ConfigMap Keys
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." ParallelismLowerBoundExceededError = "Parallelism 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 */ InvalidISVCNameFormatError = "" /* 235-byte string literal not displayed */ )
Known error messages
const (
// ExactlyOneExplainerViolatedError is a known error message
ExactlyOneExplainerViolatedError = "Exactly one of [Custom, Alibi, AIX] must be specified in ExplainerSpec"
)
const (
// ExactlyOnePredictorViolatedError is a known error message
ExactlyOnePredictorViolatedError = "Exactly one of [Custom, ONNX, Tensorflow, Triton, SKLearn, XGBoost, LightGBM] must be specified in PredictorSpec"
)
const (
ExactlyOneTransformerViolatedError = "Exactly one of [Custom, Feast] must be specified in TransformerSpec"
)
Constants
const (
InvalidLoggerType = "Invalid logger type"
)
const (
IsvcNameFmt string = "[a-z]([-a-z0-9]*[a-z0-9])?"
)
Validation for isvc name
Variables ¶
var ( ONNXServingRestPort = "8080" ONNXServingGRPCPort = "9000" ONNXFileExt = ".onnx" DefaultONNXFileName = "model.onnx" InvalidONNXRuntimeVersionError = "ONNX RuntimeVersion must be one of %s" )
var ( DefaultPyTorchModelClassName = "PyTorchModel" PyTorchServingGPUSuffix = "-gpu" InvalidPyTorchRuntimeIncludesGPU = "PyTorch RuntimeVersion is not GPU enabled but GPU resources are requested. " InvalidPyTorchRuntimeExcludesGPU = "PyTorch RuntimeVersion is GPU enabled but GPU resources are not requested. " )
var ( TensorflowEntrypointCommand = "/usr/bin/tensorflow_model_server" TensorflowServingGRPCPort = "9000" TensorflowServingRestPort = "8080" TensorflowServingGPUSuffix = "-gpu" InvalidTensorflowRuntimeIncludesGPU = "Tensorflow RuntimeVersion is not GPU enabled but GPU resources are requested. " InvalidTensorflowRuntimeExcludesGPU = "Tensorflow RuntimeVersion is GPU enabled but GPU resources are not requested. " )
var ( // For versioning see https://github.com/triton-inference-server/server/releases TritonISGRPCPort = int32(9000) TritonISRestPort = int32(8080) )
var ( SupportedStorageURIPrefixList = []string{"gs://", "s3://", "pvc://", "file://", "https://", "http://"} AzureBlobURL = "blob.core.windows.net" AzureBlobURIRegEx = "https://(.+?).blob.core.windows.net/(.+)" IsvcRegexp = regexp.MustCompile("^" + IsvcNameFmt + "$") )
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 )
var (
InvalidSKLearnRuntimeVersionError = "SKLearn RuntimeVersion must be one of %s"
)
Functions ¶
func GetIntReference ¶ added in v0.3.0
GetIntReference returns the pointer for the integer input
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 AIXExplainerSpec ¶ added in v0.5.0
type AIXExplainerSpec struct {
// The type of AIX explainer
Type AIXExplainerType `json:"type"`
// The location of a trained explanation model
StorageURI string `json:"storageUri,omitempty"`
// Defaults to latest AIX 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"`
}
AIXExplainerSpec defines the arguments for configuring an AIX Explanation Server
func (*AIXExplainerSpec) ApplyDefaults ¶ added in v0.5.0
func (s *AIXExplainerSpec) ApplyDefaults(config *InferenceServicesConfig)
func (*AIXExplainerSpec) CreateExplainerContainer ¶ added in v0.5.0
func (s *AIXExplainerSpec) CreateExplainerContainer(modelName string, parallelism int, predictorHost string, config *InferenceServicesConfig) *v1.Container
func (*AIXExplainerSpec) DeepCopy ¶ added in v0.5.0
func (in *AIXExplainerSpec) DeepCopy() *AIXExplainerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIXExplainerSpec.
func (*AIXExplainerSpec) DeepCopyInto ¶ added in v0.5.0
func (in *AIXExplainerSpec) DeepCopyInto(out *AIXExplainerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIXExplainerSpec) GetResourceRequirements ¶ added in v0.5.0
func (s *AIXExplainerSpec) GetResourceRequirements() *v1.ResourceRequirements
func (*AIXExplainerSpec) GetStorageUri ¶ added in v0.5.0
func (s *AIXExplainerSpec) GetStorageUri() string
func (*AIXExplainerSpec) Validate ¶ added in v0.5.0
func (s *AIXExplainerSpec) Validate(config *InferenceServicesConfig) error
type AIXExplainerType ¶ added in v0.5.0
type AIXExplainerType string
const (
AIXLimeImageExplainer AIXExplainerType = "LimeImages"
)
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"`
// Alibi docker image version which defaults to latest release
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) ApplyDefaults ¶
func (s *AlibiExplainerSpec) ApplyDefaults(config *InferenceServicesConfig)
func (*AlibiExplainerSpec) CreateExplainerContainer ¶ added in v0.3.0
func (s *AlibiExplainerSpec) CreateExplainerContainer(modelName string, parallelism int, predictorHost string, config *InferenceServicesConfig) *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) GetResourceRequirements ¶ added in v0.3.0
func (s *AlibiExplainerSpec) GetResourceRequirements() *v1.ResourceRequirements
func (*AlibiExplainerSpec) GetStorageUri ¶
func (s *AlibiExplainerSpec) GetStorageUri() string
func (*AlibiExplainerSpec) Validate ¶
func (s *AlibiExplainerSpec) Validate(config *InferenceServicesConfig) error
type AlibiExplainerType ¶
type AlibiExplainerType string
const ( AlibiAnchorsTabularExplainer AlibiExplainerType = "AnchorTabular" AlibiAnchorsImageExplainer AlibiExplainerType = "AnchorImages" AlibiAnchorsTextExplainer AlibiExplainerType = "AnchorText" AlibiCounterfactualsExplainer AlibiExplainerType = "Counterfactuals" AlibiContrastiveExplainer AlibiExplainerType = "Contrastive" )
type Batcher ¶ added in v0.4.0
type Batcher struct {
// MaxBatchSize of batcher service
// +optional
MaxBatchSize *int `json:"maxBatchSize,omitempty"`
// MaxLatency of batcher service
// +optional
MaxLatency *int `json:"maxLatency,omitempty"`
// Timeout of batcher service
// +optional
Timeout *int `json:"timeout,omitempty"`
}
Batcher provides optional payload batcher for all endpoints +experimental
func (*Batcher) DeepCopy ¶ added in v0.4.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Batcher.
func (*Batcher) DeepCopyInto ¶ added in v0.4.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentStatusMap ¶ added in v0.3.0
type ComponentStatusMap *map[constants.InferenceServiceComponent]StatusConfigurationSpec
EndpointStatusMap defines the observed state of InferenceService endpoints
type CustomSpec ¶
CustomSpec provides a hook for arbitrary container configuration.
func (*CustomSpec) ApplyDefaults ¶
func (c *CustomSpec) ApplyDefaults(config *InferenceServicesConfig)
func (*CustomSpec) CreateExplainerContainer ¶ added in v0.3.0
func (c *CustomSpec) CreateExplainerContainer(modelName string, parallelism int, predictUrl string, config *InferenceServicesConfig) *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 ¶ added in v0.3.0
func (c *CustomSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
func (*CustomSpec) GetContainerSpec ¶ added in v0.3.0
func (c *CustomSpec) GetContainerSpec() *v1.Container
GetContainerSpec for the CustomSpec
func (*CustomSpec) GetResourceRequirements ¶ added in v0.3.0
func (c *CustomSpec) GetResourceRequirements() *v1.ResourceRequirements
func (*CustomSpec) GetStorageUri ¶
func (c *CustomSpec) GetStorageUri() string
func (*CustomSpec) Validate ¶
func (c *CustomSpec) Validate(config *InferenceServicesConfig) 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 which defaults to 1, when minReplicas = 0 pods 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"`
// Parallelism specifies how many requests can be processed concurrently, this sets the hard limit of the container
// concurrency(https://knative.dev/docs/serving/autoscaling/concurrency).
Parallelism int `json:"parallelism,omitempty"`
// Activate request/response logging
// +optional
Logger *Logger `json:"logger,omitempty"`
// Activate request batching
// +optional
Batcher *Batcher `json:"batcher,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 Explainer ¶ added in v0.3.0
type Explainer interface {
GetResourceRequirements() *v1.ResourceRequirements
GetStorageUri() string
CreateExplainerContainer(modelName string, parallelism int, predictorHost string, config *InferenceServicesConfig) *v1.Container
ApplyDefaults(config *InferenceServicesConfig)
Validate(config *InferenceServicesConfig) error
}
+kubebuilder:object:generate=false
type ExplainerConfig ¶
type ExplainerConfig struct {
ContainerImage string `json:"image"`
DefaultImageVersion string `json:"defaultImageVersion"`
}
+kubebuilder:object:generate=false
type ExplainerSpec ¶
type ExplainerSpec struct {
// Spec for alibi explainer
Alibi *AlibiExplainerSpec `json:"alibi,omitempty"`
// Spec for AIX explainer
AIX *AIXExplainerSpec `json:"aix,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 *InferenceServicesConfig)
func (*ExplainerSpec) CreateExplainerContainer ¶ added in v0.3.0
func (e *ExplainerSpec) CreateExplainerContainer(modelName string, parallelism int, predictorHost string, config *InferenceServicesConfig) *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 *InferenceServicesConfig) error
type ExplainersConfig ¶
type ExplainersConfig struct {
AlibiExplainer ExplainerConfig `json:"alibi,omitempty"`
AIXExplainer ExplainerConfig `json:"aix,omitempty"`
}
+kubebuilder:object:generate=false
type InferenceService ¶ added in v0.3.0
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: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="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=isvc
func (*InferenceService) ConvertFrom ¶ added in v0.5.0
func (dst *InferenceService) ConvertFrom(srcRaw conversion.Hub) error
Convert from hub version v1beta1 to v1alpha2
func (*InferenceService) ConvertTo ¶ added in v0.5.0
func (src *InferenceService) ConvertTo(dstRaw conversion.Hub) error
Convert to hub version from v1alpha2 to v1beta1
func (*InferenceService) DeepCopy ¶ added in v0.3.0
func (in *InferenceService) DeepCopy() *InferenceService
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InferenceService.
func (*InferenceService) DeepCopyInto ¶ added in v0.3.0
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 ¶ added in v0.3.0
func (in *InferenceService) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*InferenceService) Default ¶ added in v0.3.0
func (isvc *InferenceService) Default()
func (*InferenceService) ValidateCreate ¶ added in v0.3.0
func (isvc *InferenceService) ValidateCreate() error
ValidateCreate implements https://godoc.org/sigs.k8s.io/controller-runtime/pkg/webhook/admission#Validator
func (*InferenceService) ValidateDelete ¶ added in v0.5.0
func (isvc *InferenceService) ValidateDelete() error
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*InferenceService) ValidateUpdate ¶ added in v0.3.0
func (isvc *InferenceService) ValidateUpdate(old runtime.Object) error
ValidateUpdate implements https://godoc.org/sigs.k8s.io/controller-runtime/pkg/webhook/admission#Validator
type InferenceServiceList ¶ added in v0.3.0
type InferenceServiceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
// +listType=set
Items []InferenceService `json:"items"`
}
+kubebuilder:object:root=true InferenceServiceList contains a list of Service
func (*InferenceServiceList) DeepCopy ¶ added in v0.3.0
func (in *InferenceServiceList) DeepCopy() *InferenceServiceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InferenceServiceList.
func (*InferenceServiceList) DeepCopyInto ¶ added in v0.3.0
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 ¶ added in v0.3.0
func (in *InferenceServiceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InferenceServiceSpec ¶ added in v0.3.0
type InferenceServiceSpec struct {
// Default defines default InferenceService endpoints
// +required
Default EndpointSpec `json:"default"`
// Canary defines 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 ¶ added in v0.3.0
func (in *InferenceServiceSpec) DeepCopy() *InferenceServiceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InferenceServiceSpec.
func (*InferenceServiceSpec) DeepCopyInto ¶ added in v0.3.0
func (in *InferenceServiceSpec) DeepCopyInto(out *InferenceServiceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InferenceServiceState ¶ added in v0.4.0
type InferenceServiceState string
InferenceState describes the Readiness of the InferenceService
const ( InferenceServiceReadyState InferenceServiceState = "InferenceServiceReady" InferenceServiceNotReadyState InferenceServiceState = "InferenceServiceNotReady" )
Different InferenceServiceState an InferenceService may have.
type InferenceServiceStatus ¶ added in v0.3.0
type InferenceServiceStatus struct {
duckv1beta1.Status `json:",inline"`
// URL of the InferenceService
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 InferenceService
Default ComponentStatusMap `json:"default,omitempty"`
// Statuses for the canary endpoints of the InferenceService
Canary ComponentStatusMap `json:"canary,omitempty"`
// Addressable URL for eventing
Address *duckv1beta1.Addressable `json:"address,omitempty"`
}
InferenceServiceStatus defines the observed state of InferenceService
func (*InferenceServiceStatus) DeepCopy ¶ added in v0.3.0
func (in *InferenceServiceStatus) DeepCopy() *InferenceServiceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InferenceServiceStatus.
func (*InferenceServiceStatus) DeepCopyInto ¶ added in v0.3.0
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 ¶ added in v0.3.0
func (ss *InferenceServiceStatus) GetCondition(t apis.ConditionType) *apis.Condition
GetCondition returns the condition by name.
func (*InferenceServiceStatus) InitializeConditions ¶ added in v0.3.0
func (ss *InferenceServiceStatus) InitializeConditions()
func (*InferenceServiceStatus) IsReady ¶ added in v0.3.0
func (ss *InferenceServiceStatus) IsReady() bool
IsReady returns if the service is ready to serve the requested configuration.
func (*InferenceServiceStatus) PropagateCanaryStatus ¶ added in v0.3.0
func (ss *InferenceServiceStatus) PropagateCanaryStatus(component constants.InferenceServiceComponent, canaryStatus *knservingv1.ServiceStatus)
PropagateCanaryStatus propagates the status for the canary spec
func (*InferenceServiceStatus) PropagateDefaultStatus ¶ added in v0.3.0
func (ss *InferenceServiceStatus) PropagateDefaultStatus(component constants.InferenceServiceComponent, defaultStatus *knservingv1.ServiceStatus)
PropagateDefaultStatus propagates the status for the default spec
func (*InferenceServiceStatus) PropagateRouteStatus ¶ added in v0.3.0
func (ss *InferenceServiceStatus) PropagateRouteStatus(vs *VirtualServiceStatus)
PropagateRouteStatus propagates route's status to the service's status.
type InferenceServicesConfig ¶ added in v0.3.0
type InferenceServicesConfig struct {
Transformers *TransformersConfig `json:"transformers"`
Predictors *PredictorsConfig `json:"predictors"`
Explainers *ExplainersConfig `json:"explainers"`
}
+kubebuilder:object:generate=false
func GetInferenceServicesConfig ¶ added in v0.3.0
func GetInferenceServicesConfig(client client.Client) (*InferenceServicesConfig, error)
func NewInferenceServicesConfig ¶ added in v0.3.0
func NewInferenceServicesConfig(configMap *v1.ConfigMap) (*InferenceServicesConfig, error)
type LightGBMSpec ¶ added in v0.5.0
type LightGBMSpec struct {
// The URI of the trained model which contains model.bst
StorageURI string `json:"storageUri"`
// Number of thread to be used by LightGBM
NThread int `json:"nthread,omitempty"`
// LightGBM KFServer docker image version which defaults to latest release
RuntimeVersion string `json:"runtimeVersion,omitempty"`
// Defaults to requests and limits of 1CPU, 2Gb MEM.
Resources v1.ResourceRequirements `json:"resources,omitempty"`
}
LightGBMSpec defines arguments for configuring LightGBM model serving.
func (*LightGBMSpec) ApplyDefaults ¶ added in v0.5.0
func (x *LightGBMSpec) ApplyDefaults(config *InferenceServicesConfig)
func (*LightGBMSpec) DeepCopy ¶ added in v0.5.0
func (in *LightGBMSpec) DeepCopy() *LightGBMSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LightGBMSpec.
func (*LightGBMSpec) DeepCopyInto ¶ added in v0.5.0
func (in *LightGBMSpec) DeepCopyInto(out *LightGBMSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LightGBMSpec) GetContainer ¶ added in v0.5.0
func (x *LightGBMSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
func (*LightGBMSpec) GetResourceRequirements ¶ added in v0.5.0
func (x *LightGBMSpec) GetResourceRequirements() *v1.ResourceRequirements
func (*LightGBMSpec) GetStorageUri ¶ added in v0.5.0
func (x *LightGBMSpec) GetStorageUri() string
func (*LightGBMSpec) Validate ¶ added in v0.5.0
func (x *LightGBMSpec) Validate(config *InferenceServicesConfig) error
type Logger ¶ added in v0.3.0
type Logger struct {
// URL to send request logging CloudEvents
// +optional
Url *string `json:"url,omitempty"`
// What payloads to log: [all, request, response]
Mode LoggerMode `json:"mode,omitempty"`
}
Logger provides optional payload logging for all endpoints +experimental
func (*Logger) DeepCopy ¶ added in v0.3.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Logger.
func (*Logger) DeepCopyInto ¶ added in v0.3.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LoggerMode ¶ added in v0.3.0
type LoggerMode string
const ( LogAll LoggerMode = "all" LogRequest LoggerMode = "request" LogResponse LoggerMode = "response" )
type ONNXSpec ¶
type ONNXSpec struct {
// The URI of the exported onnx model(model.onnx)
StorageURI string `json:"storageUri"`
// ONNXRuntime docker image versions, default version can be set in the inferenceservice configmap
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 *InferenceServicesConfig)
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 ¶ added in v0.3.0
func (*ONNXSpec) GetResourceRequirements ¶ added in v0.3.0
func (s *ONNXSpec) GetResourceRequirements() *v1.ResourceRequirements
func (*ONNXSpec) GetStorageUri ¶
func (*ONNXSpec) Validate ¶
func (s *ONNXSpec) Validate(config *InferenceServicesConfig) error
type PMMLSpec ¶ added in v0.5.0
type PMMLSpec struct {
// The URI of the trained model which contains model.pmml
StorageURI string `json:"storageUri"`
// PMML KFServer docker image version which defaults to latest release
RuntimeVersion string `json:"runtimeVersion,omitempty"`
// Defaults to requests and limits of 1CPU, 2Gb MEM.
Resources v1.ResourceRequirements `json:"resources,omitempty"`
}
PMMLSpec defines arguments for configuring PMML model serving.
func (*PMMLSpec) ApplyDefaults ¶ added in v0.5.0
func (s *PMMLSpec) ApplyDefaults(config *InferenceServicesConfig)
func (*PMMLSpec) DeepCopy ¶ added in v0.5.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PMMLSpec.
func (*PMMLSpec) DeepCopyInto ¶ added in v0.5.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PMMLSpec) GetContainer ¶ added in v0.5.0
func (*PMMLSpec) GetResourceRequirements ¶ added in v0.5.0
func (s *PMMLSpec) GetResourceRequirements() *v1.ResourceRequirements
func (*PMMLSpec) GetStorageUri ¶ added in v0.5.0
func (*PMMLSpec) Validate ¶ added in v0.5.0
func (s *PMMLSpec) Validate(config *InferenceServicesConfig) error
type Predictor ¶ added in v0.3.0
type Predictor interface {
GetResourceRequirements() *v1.ResourceRequirements
GetStorageUri() string
GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
ApplyDefaults(config *InferenceServicesConfig)
Validate(config *InferenceServicesConfig) error
}
+kubebuilder:object:generate=false
type PredictorConfig ¶ added in v0.3.0
type PredictorConfig struct {
ContainerImage string `json:"image"`
DefaultImageVersion string `json:"defaultImageVersion"`
DefaultGpuImageVersion string `json:"defaultGpuImageVersion"`
// Default timeout of predictor for serving a request, in seconds
DefaultTimeout int64 `json:"defaultTimeout,string,omitempty"`
}
+kubebuilder:object:generate=false
type PredictorProtocols ¶ added in v0.5.0
type PredictorProtocols struct {
V1 *PredictorConfig `json:"v1,omitempty"`
V2 *PredictorConfig `json:"v2,omitempty"`
}
+kubebuilder:object:generate=false
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 Triton Inference Server (https://github.com/triton-inference-server/server)
Triton *TritonSpec `json:"triton,omitempty"`
// Spec for XGBoost predictor
XGBoost *XGBoostSpec `json:"xgboost,omitempty"`
// Spec for LightGBM predictor
LightGBM *LightGBMSpec `json:"lightgbm,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"`
// Spec for PMML predictor
PMML *PMMLSpec `json:"pmml,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 *InferenceServicesConfig)
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 ¶ added in v0.3.0
func (p *PredictorSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *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 *InferenceServicesConfig) error
type PredictorsConfig ¶ added in v0.3.0
type PredictorsConfig struct {
Tensorflow PredictorConfig `json:"tensorflow,omitempty"`
Triton PredictorConfig `json:"triton,omitempty"`
Xgboost PredictorProtocols `json:"xgboost,omitempty"`
LightGBM PredictorConfig `json:"lightgbm,omitempty"`
SKlearn PredictorProtocols `json:"sklearn,omitempty"`
PyTorch PredictorConfig `json:"pytorch,omitempty"`
ONNX PredictorConfig `json:"onnx,omitempty"`
PMML PredictorConfig `json:"pmml,omitempty"`
}
+kubebuilder:object:generate=false
type PyTorchSpec ¶
type PyTorchSpec struct {
// The URI of the trained model which contains model.pt
StorageURI string `json:"storageUri"`
// Defaults PyTorch model class name to 'PyTorchModel'
ModelClassName string `json:"modelClassName,omitempty"`
// PyTorch KFServer docker image version which defaults to latest release
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 (p *PyTorchSpec) ApplyDefaults(config *InferenceServicesConfig)
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 ¶ added in v0.3.0
func (p *PyTorchSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
func (*PyTorchSpec) GetResourceRequirements ¶ added in v0.3.0
func (p *PyTorchSpec) GetResourceRequirements() *v1.ResourceRequirements
func (*PyTorchSpec) GetStorageUri ¶
func (p *PyTorchSpec) GetStorageUri() string
func (*PyTorchSpec) Validate ¶
func (p *PyTorchSpec) Validate(config *InferenceServicesConfig) error
type SKLearnSpec ¶
type SKLearnSpec struct {
// The URI of the trained model which contains model.pickle, model.pkl or model.joblib
StorageURI string `json:"storageUri"`
// SKLearn KFServer docker image version which defaults to latest release
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 *InferenceServicesConfig)
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 ¶ added in v0.3.0
func (s *SKLearnSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
func (*SKLearnSpec) GetResourceRequirements ¶ added in v0.3.0
func (s *SKLearnSpec) GetResourceRequirements() *v1.ResourceRequirements
func (*SKLearnSpec) GetStorageUri ¶
func (s *SKLearnSpec) GetStorageUri() string
func (*SKLearnSpec) Validate ¶
func (s *SKLearnSpec) Validate(config *InferenceServicesConfig) 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"`
}
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 TensorflowSpec ¶
type TensorflowSpec struct {
// The URI for the saved model(https://www.tensorflow.org/tutorials/keras/save_and_load)
StorageURI string `json:"storageUri"`
// TFServing docker image version(https://hub.docker.com/r/tensorflow/serving), default version can be set in the inferenceservice configmap.
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 *InferenceServicesConfig)
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 ¶ added in v0.3.0
func (t *TensorflowSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
func (*TensorflowSpec) GetResourceRequirements ¶ added in v0.3.0
func (t *TensorflowSpec) GetResourceRequirements() *v1.ResourceRequirements
func (*TensorflowSpec) GetStorageUri ¶
func (t *TensorflowSpec) GetStorageUri() string
func (*TensorflowSpec) Validate ¶
func (t *TensorflowSpec) Validate(config *InferenceServicesConfig) error
type Transformer ¶ added in v0.3.0
type Transformer interface {
GetContainerSpec() *v1.Container
GetStorageUri() string
ApplyDefaults(config *InferenceServicesConfig)
Validate(config *InferenceServicesConfig) error
}
Transformer interface is implemented by all Transformers +kubebuilder:object:generate=false
type TransformerConfig ¶ added in v0.3.0
type TransformerConfig struct {
ContainerImage string `json:"image"`
DefaultImageVersion string `json:"defaultImageVersion"`
}
+kubebuilder:object:generate=false
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 ¶ added in v0.3.0
func (t *TransformerSpec) ApplyDefaults(config *InferenceServicesConfig)
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 ¶ added in v0.3.0
func (t *TransformerSpec) GetContainerSpec(metadata metav1.ObjectMeta, isCanary bool) *v1.Container
GetContainerSpec for the transformer
func (*TransformerSpec) GetStorageUri ¶ added in v0.3.0
func (t *TransformerSpec) GetStorageUri() string
Returns a URI to the model. This URI is passed to the storage-initializer via the StorageInitializerSourceUriInternalAnnotationKey
func (*TransformerSpec) Validate ¶ added in v0.3.0
func (t *TransformerSpec) Validate(config *InferenceServicesConfig) error
Validate the TransformerSpec
type TransformersConfig ¶ added in v0.3.0
type TransformersConfig struct {
Feast TransformerConfig `json:"feast,omitempty"`
}
+kubebuilder:object:generate=false
type TritonSpec ¶ added in v0.4.0
type TritonSpec struct {
// The URI for the trained model repository(https://docs.nvidia.com/deeplearning/triton-inference-server/master-user-guide/docs/model_repository.html)
StorageURI string `json:"storageUri"`
// Triton Inference Server docker image version, default version can be set in the inferenceservice configmap
RuntimeVersion string `json:"runtimeVersion,omitempty"`
// Defaults to requests and limits of 1CPU, 2Gb MEM.
Resources v1.ResourceRequirements `json:"resources,omitempty"`
}
TritonSpec defines arguments for configuring Triton Inference Server.
func (*TritonSpec) ApplyDefaults ¶ added in v0.4.0
func (t *TritonSpec) ApplyDefaults(config *InferenceServicesConfig)
func (*TritonSpec) DeepCopy ¶ added in v0.4.0
func (in *TritonSpec) DeepCopy() *TritonSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TritonSpec.
func (*TritonSpec) DeepCopyInto ¶ added in v0.4.0
func (in *TritonSpec) DeepCopyInto(out *TritonSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TritonSpec) GetContainer ¶ added in v0.4.0
func (t *TritonSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
func (*TritonSpec) GetResourceRequirements ¶ added in v0.4.0
func (t *TritonSpec) GetResourceRequirements() *v1.ResourceRequirements
func (*TritonSpec) GetStorageUri ¶ added in v0.4.0
func (t *TritonSpec) GetStorageUri() string
func (*TritonSpec) Validate ¶ added in v0.4.0
func (t *TritonSpec) Validate(config *InferenceServicesConfig) error
type VirtualServiceStatus ¶ added in v0.3.0
type VirtualServiceStatus struct {
URL string
CanaryWeight int
DefaultWeight int
// Address holds the information needed for a Route to be the target of an event.
// +optional
Address *duckv1beta1.Addressable `json:"address,omitempty"`
duckv1beta1.Status
}
+k8s:openapi-gen=false
VirtualServiceStatus captures the status of the virtual service
func (*VirtualServiceStatus) DeepCopy ¶ added in v0.3.0
func (in *VirtualServiceStatus) DeepCopy() *VirtualServiceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServiceStatus.
func (*VirtualServiceStatus) DeepCopyInto ¶ added in v0.3.0
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 URI of the trained model which contains model.bst
StorageURI string `json:"storageUri"`
// Number of thread to be used by XGBoost
NThread int `json:"nthread,omitempty"`
// XGBoost KFServer docker image version which defaults to latest release
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 *InferenceServicesConfig)
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 ¶ added in v0.3.0
func (x *XGBoostSpec) GetContainer(modelName string, parallelism int, config *InferenceServicesConfig) *v1.Container
func (*XGBoostSpec) GetResourceRequirements ¶ added in v0.3.0
func (x *XGBoostSpec) GetResourceRequirements() *v1.ResourceRequirements
func (*XGBoostSpec) GetStorageUri ¶
func (x *XGBoostSpec) GetStorageUri() string
func (*XGBoostSpec) Validate ¶
func (x *XGBoostSpec) Validate(config *InferenceServicesConfig) error
Source Files
¶
- configmap.go
- doc.go
- explainer.go
- explainer_aix360.go
- explainer_alibi.go
- framework_custom.go
- framework_lightgbm.go
- framework_onnx.go
- framework_pmml.go
- framework_pytorch.go
- framework_scikit.go
- framework_tensorflow.go
- framework_triton.go
- framework_xgboost.go
- inference_logger.go
- inferenceservice_conversion.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
- utils.go
- zz_generated.deepcopy.go