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 GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- func Resource(resource string) schema.GroupResource
- type AlibiExplainerSpec
- func (s *AlibiExplainerSpec) ApplyDefaults()
- func (s *AlibiExplainerSpec) CreateExplainerServingContainer(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) Validate() error
- type AlibiExplainerType
- type CustomSpec
- func (c *CustomSpec) ApplyDefaults()
- func (c *CustomSpec) CreateExplainerServingContainer(modelName string, predictUrl string, config *ExplainersConfig) *v1.Container
- func (c *CustomSpec) CreateModelServingContainer(modelName string, config *FrameworksConfig) *v1.Container
- func (in *CustomSpec) DeepCopy() *CustomSpec
- func (in *CustomSpec) DeepCopyInto(out *CustomSpec)
- func (c *CustomSpec) GetStorageUri() string
- func (c *CustomSpec) Validate() error
- type DeploymentSpec
- type EndpointSpec
- type ExplainerConfig
- type ExplainerHandler
- type ExplainerSpec
- func (m *ExplainerSpec) ApplyDefaults()
- func (m *ExplainerSpec) CreateExplainerServingContainer(modelName string, predictorHost string, config *ExplainersConfig) *v1.Container
- func (in *ExplainerSpec) DeepCopy() *ExplainerSpec
- func (in *ExplainerSpec) DeepCopyInto(out *ExplainerSpec)
- func (m *ExplainerSpec) GetStorageUri() string
- func (m *ExplainerSpec) Validate() error
- type ExplainersConfig
- type FrameworkConfig
- type FrameworkHandler
- type FrameworksConfig
- type KFService
- type KFServiceList
- type KFServiceSpec
- type KFServiceStatus
- func (in *KFServiceStatus) DeepCopy() *KFServiceStatus
- func (in *KFServiceStatus) DeepCopyInto(out *KFServiceStatus)
- func (ss *KFServiceStatus) GetCondition(t apis.ConditionType) *apis.Condition
- func (ss *KFServiceStatus) InitializeConditions()
- func (ss *KFServiceStatus) IsReady() bool
- func (ss *KFServiceStatus) PropagateCanaryPredictorStatus(canaryStatus *knservingv1alpha1.ServiceStatus)
- func (ss *KFServiceStatus) PropagateCanaryStatus(endpoint constants.KFServiceEndpoint, ...)
- func (ss *KFServiceStatus) PropagateDefaultPredictorStatus(defaultStatus *knservingv1alpha1.ServiceStatus)
- func (ss *KFServiceStatus) PropagateDefaultStatus(endpoint constants.KFServiceEndpoint, ...)
- func (ss *KFServiceStatus) PropagateRouteStatus(rs *knservingv1alpha1.RouteStatus)
- type ONNXSpec
- func (s *ONNXSpec) ApplyDefaults()
- func (s *ONNXSpec) CreateModelServingContainer(modelName string, config *FrameworksConfig) *v1.Container
- func (in *ONNXSpec) DeepCopy() *ONNXSpec
- func (in *ONNXSpec) DeepCopyInto(out *ONNXSpec)
- func (s *ONNXSpec) GetStorageUri() string
- func (s *ONNXSpec) Validate() error
- type PredictorSpec
- func (m *PredictorSpec) ApplyDefaults()
- func (m *PredictorSpec) CreateModelServingContainer(modelName string, config *FrameworksConfig) *v1.Container
- func (in *PredictorSpec) DeepCopy() *PredictorSpec
- func (in *PredictorSpec) DeepCopyInto(out *PredictorSpec)
- func (m *PredictorSpec) GetStorageUri() string
- func (m *PredictorSpec) Validate() error
- type PyTorchSpec
- func (s *PyTorchSpec) ApplyDefaults()
- func (s *PyTorchSpec) CreateModelServingContainer(modelName string, config *FrameworksConfig) *v1.Container
- func (in *PyTorchSpec) DeepCopy() *PyTorchSpec
- func (in *PyTorchSpec) DeepCopyInto(out *PyTorchSpec)
- func (s *PyTorchSpec) GetStorageUri() string
- func (s *PyTorchSpec) Validate() error
- type SKLearnSpec
- func (s *SKLearnSpec) ApplyDefaults()
- func (s *SKLearnSpec) CreateModelServingContainer(modelName string, config *FrameworksConfig) *v1.Container
- func (in *SKLearnSpec) DeepCopy() *SKLearnSpec
- func (in *SKLearnSpec) DeepCopyInto(out *SKLearnSpec)
- func (s *SKLearnSpec) GetStorageUri() string
- func (s *SKLearnSpec) Validate() error
- type StatusConfigurationSpec
- type TensorRTSpec
- func (t *TensorRTSpec) ApplyDefaults()
- func (t *TensorRTSpec) CreateModelServingContainer(modelName string, config *FrameworksConfig) *v1.Container
- func (in *TensorRTSpec) DeepCopy() *TensorRTSpec
- func (in *TensorRTSpec) DeepCopyInto(out *TensorRTSpec)
- func (t *TensorRTSpec) GetStorageUri() string
- func (t *TensorRTSpec) Validate() error
- type TensorflowSpec
- func (t *TensorflowSpec) ApplyDefaults()
- func (t *TensorflowSpec) CreateModelServingContainer(modelName string, config *FrameworksConfig) *v1.Container
- func (in *TensorflowSpec) DeepCopy() *TensorflowSpec
- func (in *TensorflowSpec) DeepCopyInto(out *TensorflowSpec)
- func (t *TensorflowSpec) GetStorageUri() string
- func (t *TensorflowSpec) Validate() error
- type TransformerSpec
- type XGBoostSpec
- func (x *XGBoostSpec) ApplyDefaults()
- func (x *XGBoostSpec) CreateModelServingContainer(modelName string, config *FrameworksConfig) *v1.Container
- func (in *XGBoostSpec) DeepCopy() *XGBoostSpec
- func (in *XGBoostSpec) DeepCopyInto(out *XGBoostSpec)
- func (x *XGBoostSpec) GetStorageUri() string
- func (x *XGBoostSpec) Validate() error
Constants ¶
const ( // ExactlyOneModelSpecViolatedError is a known error message ExactlyOneExplainerSpecViolatedError = "Exactly one of [Custom, Alibi] must be specified in ExplainerSpec" // AtLeastOneModelSpecViolatedError is a known error message AtLeastOneExplainerSpecViolatedError = "At least one of [Custom, Alibi] must be specified in ExplainerSpec" )
const ( // ExactlyOneModelSpecViolatedError is a known error message ExactlyOneModelSpecViolatedError = "Exactly one of [Custom, ONNX, Tensorflow, TensorRT, SKLearn, XGBoost] must be specified in ModelSpec" // AtLeastOneModelSpecViolatedError is a known error message AtLeastOneModelSpecViolatedError = "At least one of [Custom, ONNX, Tensorflow, TensorRT, SKLearn, XGBoost] must be specified in ModelSpec" )
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" )
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
Variables ¶
var ( AlibiImageName = "docker.io/seldonio/alibiexplainer" DefaultAlibiRuntimeVersion = "0.2.3" AllowedAlibiRuntimeVersions = []string{ "0.2.3", } InvalidAlibiRuntimeVersionError = "RuntimeVersion must be one of " + strings.Join(AllowedAlibiRuntimeVersions, ", ") )
var ( DefaultMemory = resource.MustParse("2Gi") DefaultCPU = resource.MustParse("1") )
var ( ONNXServingRestPort = "8080" ONNXServingGRPCPort = "9000" ONNXServingImageName = "mcr.microsoft.com/onnxruntime/server" ONNXModelFileName = "model.onnx" DefaultONNXRuntimeVersion = "latest" AllowedONNXRuntimeVersions = []string{ DefaultONNXRuntimeVersion, "v0.5.0", } InvalidONNXRuntimeVersionError = "RuntimeVersion must be one of " + strings.Join(AllowedONNXRuntimeVersions, ", ") )
var ( AllowedSKLearnRuntimeVersions = []string{ "latest", "v0.1.2", } InvalidSKLearnRuntimeVersionError = "RuntimeVersion must be one of " + strings.Join(AllowedSKLearnRuntimeVersions, ", ") SKLearnServerImageName = "gcr.io/kfserving/sklearnserver" DefaultSKLearnRuntimeVersion = "latest" )
TODO add image name to to configmap
var ( TensorflowEntrypointCommand = "/usr/bin/tensorflow_model_server" TensorflowServingGRPCPort = "9000" TensorflowServingRestPort = "8080" TensorflowServingImageName = "tensorflow/serving" DefaultTensorflowRuntimeVersion = "latest" TensorflowServingGPUSuffix = "-gpu" DefaultTensorflowRuntimeVersionGPU = DefaultTensorflowRuntimeVersion + TensorflowServingGPUSuffix AllowedTensorflowRuntimeVersions = []string{ DefaultTensorflowRuntimeVersion, DefaultTensorflowRuntimeVersionGPU, "1.13.0", "1.13.0" + TensorflowServingGPUSuffix, "1.12.0", "1.12.0" + TensorflowServingGPUSuffix, "1.11.0", "1.11.0" + TensorflowServingGPUSuffix, } InvalidTensorflowRuntimeVersionError = "RuntimeVersion must be one of " + strings.Join(AllowedTensorflowRuntimeVersions, ", ") 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 ( AllowedXGBoostRuntimeVersions = []string{ "latest", "v0.1.2", } InvalidXGBoostRuntimeVersionError = "RuntimeVersion must be one of " + strings.Join(AllowedXGBoostRuntimeVersions, ", ") XGBoostServerImageName = "gcr.io/kfserving/xgbserver" DefaultXGBoostRuntimeVersion = "latest" )
TODO add image name to to configmap
var ( AllowedPyTorchRuntimeVersions = []string{ "latest", "v0.1.2", } InvalidPyTorchRuntimeVersionError = "RuntimeVersion must be one of " + strings.Join(AllowedPyTorchRuntimeVersions, ", ") PyTorchServerImageName = "gcr.io/kfserving/pytorchserver" DefaultPyTorchRuntimeVersion = "latest" DefaultPyTorchModelClassName = "PyTorchModel" )
TODO add image name to to configmap
var ( DefaultTensorRTISImageName = "nvcr.io/nvidia/tensorrtserver" // For versioning see https://github.com/NVIDIA/tensorrt-inference-server/releases DefaultTensorRTISRuntimeVersion = "19.05-py3" AllowedTensorRTISRuntimeVersions = []string{ "19.05-py3", } InvalidTensorRTISRuntimeVersionError = "RuntimeVersion must be one of " + strings.Join(AllowedTensorRTISRuntimeVersions, ", ") TensorRTISGRPCPort = int32(9000) TensorRTISRestPort = int32(8080) )
var ( SupportedStorageURIPrefixList = []string{"gs://", "s3://", "pvc://", "file://"} AzureBlobURIRegEx = "https://(.+?).blob.core.windows.net/(.+)" )
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) ApplyDefaults ¶
func (s *AlibiExplainerSpec) ApplyDefaults()
func (*AlibiExplainerSpec) CreateExplainerServingContainer ¶
func (s *AlibiExplainerSpec) CreateExplainerServingContainer(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) Validate ¶
func (s *AlibiExplainerSpec) Validate() 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()
func (*CustomSpec) CreateExplainerServingContainer ¶
func (c *CustomSpec) CreateExplainerServingContainer(modelName string, predictUrl string, config *ExplainersConfig) *v1.Container
func (*CustomSpec) CreateModelServingContainer ¶
func (c *CustomSpec) CreateModelServingContainer(modelName string, config *FrameworksConfig) *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) GetStorageUri ¶
func (c *CustomSpec) GetStorageUri() string
func (*CustomSpec) Validate ¶
func (c *CustomSpec) Validate() 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 KFService 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 transformer or predictor service
// +optional
Explainer *ExplainerSpec `json:"explainer,omitempty"`
// Transformer defines the transformer service spec for pre/post processing
// 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 ExplainerConfig ¶
type ExplainerConfig struct {
ContainerImage string `json:"image"`
}
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 ExplainerHandler ¶
type ExplainerSpec ¶
type ExplainerSpec struct {
// The following fields follow a "1-of" semantic. Users must specify exactly one spec.
Alibi *AlibiExplainerSpec `json:"alibi,omitempty"`
Custom *CustomSpec `json:"custom,omitempty"`
DeploymentSpec `json:",inline"`
}
ExplainerSpec defines the arguments for a model explanation server
func (*ExplainerSpec) ApplyDefaults ¶
func (m *ExplainerSpec) ApplyDefaults()
func (*ExplainerSpec) CreateExplainerServingContainer ¶
func (m *ExplainerSpec) CreateExplainerServingContainer(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 (m *ExplainerSpec) GetStorageUri() string
Returns a URI to the explainer. This URI is passed to the model-initializer via the ModelInitializerSourceUriInternalAnnotationKey
func (*ExplainerSpec) Validate ¶
func (m *ExplainerSpec) Validate() error
type ExplainersConfig ¶
type ExplainersConfig struct {
AlibiExplainer ExplainerConfig `json:"alibi,omitempty"`
}
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 FrameworkConfig ¶
type FrameworkConfig struct {
ContainerImage string `json:"image"`
}
func (*FrameworkConfig) DeepCopy ¶
func (in *FrameworkConfig) DeepCopy() *FrameworkConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FrameworkConfig.
func (*FrameworkConfig) DeepCopyInto ¶
func (in *FrameworkConfig) DeepCopyInto(out *FrameworkConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FrameworkHandler ¶
type FrameworksConfig ¶
type FrameworksConfig struct {
Tensorflow FrameworkConfig `json:"tensorflow,omitempty"`
TensorRT FrameworkConfig `json:"tensorrt,omitempty"`
Xgboost FrameworkConfig `json:"xgboost,omitempty"`
SKlearn FrameworkConfig `json:"sklearn,omitempty"`
PyTorch FrameworkConfig `json:"pytorch,omitempty"`
ONNX FrameworkConfig `json:"onnx,omitempty"`
}
func (*FrameworksConfig) DeepCopy ¶
func (in *FrameworksConfig) DeepCopy() *FrameworksConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FrameworksConfig.
func (*FrameworksConfig) DeepCopyInto ¶
func (in *FrameworksConfig) DeepCopyInto(out *FrameworksConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KFService ¶
type KFService struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec KFServiceSpec `json:"spec,omitempty"`
Status KFServiceStatus `json:"status,omitempty"`
}
KFService is the Schema for the services API +k8s:openapi-gen=true +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="URL",type="string",JSONPath=".status.url" +kubebuilder:printcolumn:name="Default Traffic",type="integer",JSONPath=".status.default.traffic" +kubebuilder:printcolumn:name="Canary Traffic",type="integer",JSONPath=".status.canary.traffic" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:path=kfservices,shortName=kfservice
func (*KFService) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KFService.
func (*KFService) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KFService) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*KFService) Default ¶
func (kfsvc *KFService) Default()
Default implements https://godoc.org/sigs.k8s.io/controller-runtime/pkg/webhook/admission#Defaulter
func (*KFService) ValidateCreate ¶
ValidateCreate implements https://godoc.org/sigs.k8s.io/controller-runtime/pkg/webhook/admission#Validator
func (*KFService) ValidateUpdate ¶
ValidateUpdate implements https://godoc.org/sigs.k8s.io/controller-runtime/pkg/webhook/admission#Validator
type KFServiceList ¶
type KFServiceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []KFService `json:"items"`
}
KFServiceList contains a list of Service
func (*KFServiceList) DeepCopy ¶
func (in *KFServiceList) DeepCopy() *KFServiceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KFServiceList.
func (*KFServiceList) DeepCopyInto ¶
func (in *KFServiceList) DeepCopyInto(out *KFServiceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KFServiceList) DeepCopyObject ¶
func (in *KFServiceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KFServiceSpec ¶
type KFServiceSpec struct {
// Default defines default KFService 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 KFService endpoints
// +optional
CanaryTrafficPercent int `json:"canaryTrafficPercent,omitempty"`
}
KFServiceSpec defines the desired state of KFService
func (*KFServiceSpec) DeepCopy ¶
func (in *KFServiceSpec) DeepCopy() *KFServiceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KFServiceSpec.
func (*KFServiceSpec) DeepCopyInto ¶
func (in *KFServiceSpec) DeepCopyInto(out *KFServiceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KFServiceStatus ¶
type KFServiceStatus struct {
duckv1beta1.Status `json:",inline"`
URL string `json:"url,omitempty"`
Default StatusConfigurationSpec `json:"default,omitempty"`
Canary StatusConfigurationSpec `json:"canary,omitempty"`
}
KFServiceStatus defines the observed state of KFService
func (*KFServiceStatus) DeepCopy ¶
func (in *KFServiceStatus) DeepCopy() *KFServiceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KFServiceStatus.
func (*KFServiceStatus) DeepCopyInto ¶
func (in *KFServiceStatus) DeepCopyInto(out *KFServiceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KFServiceStatus) GetCondition ¶
func (ss *KFServiceStatus) GetCondition(t apis.ConditionType) *apis.Condition
GetCondition returns the condition by name.
func (*KFServiceStatus) InitializeConditions ¶
func (ss *KFServiceStatus) InitializeConditions()
func (*KFServiceStatus) IsReady ¶
func (ss *KFServiceStatus) IsReady() bool
IsReady returns if the service is ready to serve the requested configuration.
func (*KFServiceStatus) PropagateCanaryPredictorStatus ¶
func (ss *KFServiceStatus) PropagateCanaryPredictorStatus(canaryStatus *knservingv1alpha1.ServiceStatus)
PropagateCanaryPredictorStatus propagates the canary predictor status and applies its values to the Service status.
func (*KFServiceStatus) PropagateCanaryStatus ¶
func (ss *KFServiceStatus) PropagateCanaryStatus(endpoint constants.KFServiceEndpoint, canaryStatus *knservingv1alpha1.ServiceStatus)
func (*KFServiceStatus) PropagateDefaultPredictorStatus ¶
func (ss *KFServiceStatus) PropagateDefaultPredictorStatus(defaultStatus *knservingv1alpha1.ServiceStatus)
PropagateDefaultPredictorStatus propagates the default predictor status and applies its values to the Service status.
func (*KFServiceStatus) PropagateDefaultStatus ¶
func (ss *KFServiceStatus) PropagateDefaultStatus(endpoint constants.KFServiceEndpoint, defaultStatus *knservingv1alpha1.ServiceStatus)
func (*KFServiceStatus) PropagateRouteStatus ¶
func (ss *KFServiceStatus) PropagateRouteStatus(rs *knservingv1alpha1.RouteStatus)
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"`
// Defaults to latest ONNX Version.
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()
func (*ONNXSpec) CreateModelServingContainer ¶
func (s *ONNXSpec) CreateModelServingContainer(modelName string, config *FrameworksConfig) *v1.Container
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) GetStorageUri ¶
type PredictorSpec ¶
type PredictorSpec struct {
// The following fields follow a "1-of" semantic. Users must specify exactly one spec.
Custom *CustomSpec `json:"custom,omitempty"`
Tensorflow *TensorflowSpec `json:"tensorflow,omitempty"`
TensorRT *TensorRTSpec `json:"tensorrt,omitempty"`
XGBoost *XGBoostSpec `json:"xgboost,omitempty"`
SKLearn *SKLearnSpec `json:"sklearn,omitempty"`
ONNX *ONNXSpec `json:"onnx,omitempty"`
PyTorch *PyTorchSpec `json:"pytorch,omitempty"`
DeploymentSpec `json:",inline"`
}
PredictorSpec defines the configuration to route traffic to a predictor.
func (*PredictorSpec) ApplyDefaults ¶
func (m *PredictorSpec) ApplyDefaults()
func (*PredictorSpec) CreateModelServingContainer ¶
func (m *PredictorSpec) CreateModelServingContainer(modelName string, config *FrameworksConfig) *v1.Container
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) GetStorageUri ¶
func (m *PredictorSpec) GetStorageUri() string
Returns a URI to the model. This URI is passed to the storage-initializer via the StorageInitializerSourceUriInternalAnnotationKey
func (*PredictorSpec) Validate ¶
func (m *PredictorSpec) Validate() error
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"`
// Defaults to latest PyTorch Version
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()
func (*PyTorchSpec) CreateModelServingContainer ¶
func (s *PyTorchSpec) CreateModelServingContainer(modelName string, config *FrameworksConfig) *v1.Container
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) GetStorageUri ¶
func (s *PyTorchSpec) GetStorageUri() string
func (*PyTorchSpec) Validate ¶
func (s *PyTorchSpec) Validate() error
type SKLearnSpec ¶
type SKLearnSpec struct {
// The location of the trained model
StorageURI string `json:"storageUri"`
// Defaults to latest SKLearn Version.
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()
func (*SKLearnSpec) CreateModelServingContainer ¶
func (s *SKLearnSpec) CreateModelServingContainer(modelName string, config *FrameworksConfig) *v1.Container
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) GetStorageUri ¶
func (s *SKLearnSpec) GetStorageUri() string
func (*SKLearnSpec) Validate ¶
func (s *SKLearnSpec) Validate() error
type StatusConfigurationSpec ¶
type StatusConfigurationSpec struct {
Name string `json:"name,omitempty"`
Replicas int `json:"replicas,omitempty"`
Traffic int `json:"traffic,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"`
// Defaults to latest TensorRT Version.
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()
func (*TensorRTSpec) CreateModelServingContainer ¶
func (t *TensorRTSpec) CreateModelServingContainer(modelName string, config *FrameworksConfig) *v1.Container
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) GetStorageUri ¶
func (t *TensorRTSpec) GetStorageUri() string
func (*TensorRTSpec) Validate ¶
func (t *TensorRTSpec) Validate() error
type TensorflowSpec ¶
type TensorflowSpec struct {
// The location of the trained model
StorageURI string `json:"storageUri"`
// Defaults to latest TF Version.
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()
func (*TensorflowSpec) CreateModelServingContainer ¶
func (t *TensorflowSpec) CreateModelServingContainer(modelName string, config *FrameworksConfig) *v1.Container
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) GetStorageUri ¶
func (t *TensorflowSpec) GetStorageUri() string
func (*TensorflowSpec) Validate ¶
func (t *TensorflowSpec) Validate() error
type TransformerSpec ¶
type TransformerSpec struct {
Custom *CustomSpec `json:"custom,omitempty"`
DeploymentSpec `json:",inline"`
}
TransformerSpec defines transformer service for pre/post processing
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.
type XGBoostSpec ¶
type XGBoostSpec struct {
// The location of the trained model
StorageURI string `json:"storageUri"`
// Defaults to latest XGBoost Version.
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()
func (*XGBoostSpec) CreateModelServingContainer ¶
func (x *XGBoostSpec) CreateModelServingContainer(modelName string, config *FrameworksConfig) *v1.Container
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) GetStorageUri ¶
func (x *XGBoostSpec) GetStorageUri() string
func (*XGBoostSpec) Validate ¶
func (x *XGBoostSpec) Validate() error
Source Files
¶
- doc.go
- explainer.go
- explainer_alibi.go
- framework.go
- framework_custom.go
- framework_onnx.go
- framework_scikit.go
- framework_tensorflow.go
- framework_xgboost.go
- kfservice_defaults.go
- kfservice_framework_pytorch.go
- kfservice_framework_tensorrt.go
- kfservice_status.go
- kfservice_types.go
- kfservice_validation.go
- openapi_generated.go
- register.go
- zz_generated.deepcopy.go