constants

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KnativeLocalGateway   = "knative-serving/cluster-local-gateway"
	KnativeIngressGateway = "knative-serving/knative-ingress-gateway"
)
View Source
const (
	InferenceServiceDefaultHttpPort   = "8080"
	InferenceServiceDefaultLoggerPort = "8081"
	CommonDefaultHttpPort             = 80
)

InferenceService Endpoint Ports

View Source
const (
	KServiceComponentLabel = "component"
	KServiceModelLabel     = "model"
	KServiceEndpointLabel  = "endpoint"
)

Labels to put on kservice

View Source
const (
	InferenceServiceDefault = "default"
	InferenceServiceCanary  = "canary"
)

InferenceService default/canary constants

View Source
const (
	ArgumentModelName      = "--model_name"
	ArgumentModelDir       = "--model_dir"
	ArgumentModelClassName = "--model_class_name"
	ArgumentPredictorHost  = "--predictor_host"
	ArgumentHttpPort       = "--http_port"
	ArgumentWorkers        = "--workers"
)

InferenceService model server args

View Source
const (
	CustomSpecStorageUriEnvVarKey = "STORAGE_URI"
)

InferenceService Environment Variables

View Source
const DefaultModelLocalMountPath = "/mnt/models"

DefaultModelLocalMountPath is where models will be mounted by the storage-initializer

View Source
const (
	InferenceServiceContainerName = "kfserving-container"
)

InferenceService container name

View Source
const (
	NvidiaGPUResourceType = "nvidia.com/gpu"
)

GPU Constants

Variables

View Source
var (
	KFServingName           = "kfserving"
	KFServingAPIGroupName   = "serving.kubeflow.org"
	KFServingNamespace      = getEnvOrDefault("POD_NAMESPACE", "kfserving-system")
	KFServingDefaultVersion = "v0.3.0"
)

KFServing Constants

View Source
var (
	InferenceServiceName          = "inferenceservice"
	InferenceServiceAPIName       = "inferenceservices"
	InferenceServicePodLabelKey   = KFServingAPIGroupName + "/" + InferenceServiceName
	InferenceServiceConfigMapName = "inferenceservice-config"
)

InferenceService Constants

View Source
var (
	InferenceServiceInternalAnnotationsPrefix        = "internal." + KFServingAPIGroupName
	StorageInitializerSourceUriInternalAnnotationKey = InferenceServiceInternalAnnotationsPrefix + "/storage-initializer-sourceuri"
	LoggerInternalAnnotationKey                      = InferenceServiceInternalAnnotationsPrefix + "/logger"
	LoggerSinkUrlInternalAnnotationKey               = InferenceServiceInternalAnnotationsPrefix + "/logger-sink-url"
	LoggerModeInternalAnnotationKey                  = InferenceServiceInternalAnnotationsPrefix + "/logger-mode"
)

InferenceService Internal Annotations

View Source
var (
	ControllerLabelName             = KFServingName + "-controller-manager"
	DefaultPredictorTimeout   int64 = 60
	DefaultTransformerTimeout int64 = 120
	DefaultExplainerTimeout   int64 = 300
	DefaultScalingTarget            = "1"
	DefaultMinReplicas              = 1
)

Controller Constants

View Source
var (
	EnableKFServingMutatingWebhook         = "enabled"
	EnableWebhookNamespaceSelectorEnvName  = "ENABLE_WEBHOOK_NAMESPACE_SELECTOR"
	EnableWebhookNamespaceSelectorEnvValue = "enabled"
	IsEnableWebhookNamespaceSelector       = isEnvVarMatched(EnableWebhookNamespaceSelectorEnvName, EnableWebhookNamespaceSelectorEnvValue)
	PodMutatorWebhookName                  = KFServingName + "-pod-mutator-webhook"
)

Webhook Constants

View Source
var (
	InferenceServiceGKEAcceleratorAnnotationKey = KFServingAPIGroupName + "/gke-accelerator"
)

InferenceService Annotations

View Source
var (
	LocalGatewayHost = "cluster-local-gateway.istio-system.svc." + network.GetClusterDomainName()
)

Functions

func CanaryExplainerServiceName added in v0.1.3

func CanaryExplainerServiceName(name string) string

func CanaryPredictorServiceName added in v0.1.3

func CanaryPredictorServiceName(name string) string

func CanaryPredictorServiceURL added in v0.3.0

func CanaryPredictorServiceURL(name string, namespace string, domain string) string

func CanaryServiceName added in v0.1.3

func CanaryServiceName(name string, component InferenceServiceComponent) string

func CanaryTransformerServiceName added in v0.1.3

func CanaryTransformerServiceName(name string) string

func DefaultExplainerServiceName added in v0.1.3

func DefaultExplainerServiceName(name string) string

func DefaultPredictorServiceName added in v0.1.3

func DefaultPredictorServiceName(name string) string

func DefaultPredictorServiceURL added in v0.3.0

func DefaultPredictorServiceURL(name string, namespace string, domain string) string

func DefaultServiceName added in v0.1.3

func DefaultServiceName(name string, component InferenceServiceComponent) string

func DefaultTransformerServiceName added in v0.1.3

func DefaultTransformerServiceName(name string) string

func ExplainPrefix added in v0.3.0

func ExplainPrefix(name string) string

func GetLoggerDefaultUrl added in v0.3.0

func GetLoggerDefaultUrl(namespace string) string

func HostRegExp added in v0.3.0

func HostRegExp(host string) string

hostRegExp returns an ECMAScript regular expression to match either host or host:<any port> for clusterLocalHost, we will also match the prefixes.

func InferenceServiceHostName added in v0.3.0

func InferenceServiceHostName(name string, namespace string, domain string) string

func InferenceServicePrefix added in v0.3.0

func InferenceServicePrefix(name string) string

func InferenceServiceURL added in v0.3.0

func InferenceServiceURL(scheme, name, namespace, domain string) string

func PredictPrefix added in v0.3.0

func PredictPrefix(name string) string

func PredictorURL added in v0.3.0

func PredictorURL(metadata v1.ObjectMeta, isCanary bool) string

func TransformerURL added in v0.3.0

func TransformerURL(metadata v1.ObjectMeta, isCanary bool) string

Types

type InferenceServiceComponent added in v0.3.0

type InferenceServiceComponent string
const (
	Predictor   InferenceServiceComponent = "predictor"
	Explainer   InferenceServiceComponent = "explainer"
	Transformer InferenceServiceComponent = "transformer"
)

InferenceService Component enums

func (InferenceServiceComponent) String added in v0.3.0

func (e InferenceServiceComponent) String() string

type InferenceServiceVerb added in v0.3.0

type InferenceServiceVerb string
const (
	Predict InferenceServiceVerb = "predict"
	Explain InferenceServiceVerb = "explain"
)

InferenceService verb enums

func (InferenceServiceVerb) String added in v0.3.0

func (v InferenceServiceVerb) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL