constants

package
v0.0.0-...-34e6c99 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InferenceLoggerNameSuffix = "inferencelogger"
	// Labels
	InferenceLoggerModelLabel                          = "model"
	InferenceLoggerEnvKafkaBrokersLabel                = "KAFKA_BROKERS"
	InferenceLoggerEnvKafkaTopicLabel                  = "KAFKA_TOPIC"
	InferenceLoggerEnvKafkaTopicPartitionsLabel        = "KAFKA_TOPIC_PARTITIONS"
	InferenceLoggerEnvKafkaTopicReplicationFactorLabel = "KAFKA_TOPIC_REPLICATION_FACTOR"
)

InferenceLogger constants

View Source
const (
	MonitoringJobNameSuffix = "monitoring-job"
	// Labels
	MonitoringJobSparkVersionLabel           = "version"
	MonitoringJobEnvVarModelInfoLabel        = "MODEL_INFO"
	MonitoringJobEnvVarMonitoringConfigLabel = "MONITORING_CONFIG"
	MonitoringJobEnvVarStorageConfigLabel    = "STORAGE_CONFIG"
	MonitoringJobEnvVarJobConfigLabel        = "JOB_CONFIG"
)

Job constants

View Source
const (
	KafkaTopicNameSuffix = "inference-topic"
	// Labels
	KafkaTopicLabel                  = "topic"
	KafkaBrokersLabel                = "brokers"
	KafkaTopicPartitionsLabel        = "partitions"
	KafkaTopicReplicationFactorLabel = "replicationFactor"
)

KafkaTopic constants

View Source
const (
	ServiceAccount = "ServiceAccount"
	Role           = "Role"
	// Suffix
	ServiceAccountNameSuffix = "sa"
	RoleNameSuffix           = "r"
	RoleBindingNameSuffix    = "rb"
)

Permissions

Variables

View Source
var (
	ModelMonitoringName         = "model-monitoring"
	ModelMonitoringAPIGroupName = "monitoring.model.dev"
	ModelMonitoringNamespace    = ModelMonitoringName + "-system"
)

ModelMonitoring Operator constants

View Source
var (
	ModelMonitorName          = "modelmonitor"
	ModelMonitorAPIName       = "modelmonitors"
	ModelMonitorPodLabelKey   = ModelMonitoringAPIGroupName + "/" + ModelMonitorName
	ModelMonitorConfigMapName = ModelMonitoringName + "-" + ModelMonitorName + "-config"
	ModelMonitorContainerName = ModelMonitorName + "-container"
)

ModelMonitor constants

View Source
var (
	ModelMonitorControllerName = ModelMonitorName + "-controller"
	ControllerLabelName        = ModelMonitorControllerName + "-manager"
)

ModelMonitor Controller Constants

View Source
var (
	InferenceLoggerDefaultCPU                               = "0.1"
	InferenceLoggerDefaultMemory                            = "128Mi"
	InferenceLoggerDefaultTimeout                     int64 = 300
	InferenceLoggerDefaultScalingClass                      = autoscaling.KPA // kpa or hpa
	InferenceLoggerDefaultScalingMetric                     = "concurrency"   // concurrency, rps or cpu (hpa required)
	InferenceLoggerDefaultScalingTarget                     = 100
	InferenceLoggerDefaultTargetUtilizationPercentage       = "70"
	InferenceLoggerDefaultMinScale                          = 1 // 0 if scale-to-zero is desired
	InferenceLoggerDefaultMaxScale                          = 0 // 0 means limitless
	InferenceLoggerDefaultWindow                            = "60s"
	InferenceLoggerDefaultPanicWindow                       = "10" // percentage of StableWindow
	InferenceLoggerDefaultPanicThreshold                    = "200"
)

InferenceLogger defaults

View Source
var (
	// Permissions
	MonitoringJobAssignee = "spark"
	// Spark
	MonitoringJobSparkVersion    = "2.4.5"
	MonitoringJobImagePullPolicy = "Always"
	// Driver
	MonitoringJobDriverCores     int32 = 1
	MonitoringJobDriverCoreLimit       = "1000m"
	MonitoringJobDriverMemory          = "512m"
	// Executor
	MonitoringJobExecutorCores     int32 = 1
	MonitoringJobExecutorCoreLimit       = "1000m"
	MonitoringJobExecutorMemory          = "512m"
	MonitoringJobExecutorInstances int32 = 1
	// Volume
	MonitoringJobVolumeName         = "test-volume"
	MonitoringJobVolumeHostPath     = "/tmp"
	MonitoringJobVolumeHostPathType = corev1.HostPathDirectory
	// VolumeMount
	MonitoringJobVolumeMountName = "test-volume"
	MonitoringJobVolumeMountPath = "/tmp"
	// Monitoring
	MonitoringJobPrometheusExportDriverMetrics         = true
	MonitoringJobPrometheusExportExecutorMetrics       = true
	MonitoringJobPrometheusJmxExporterJar              = "/prometheus/jmx_prometheus_javaagent-0.11.0.jar"
	MonitoringJobPrometheusPort                  int32 = 8090
)

TODO: Add Driver and Executor variables to api Job template & defaults

Functions

func DefaultInferenceLoggerName

func DefaultInferenceLoggerName(prefix string) string

DefaultInferenceLoggerName builds a default name

func DefaultKafkaTopicName

func DefaultKafkaTopicName(modelName string) string

DefaultKafkaTopicName build a default Kafka Topic name

func DefaultMonitoringJobName

func DefaultMonitoringJobName(modelName string) string

DefaultMonitoringJobName build a default Kafka Topic name

func DefaultRoleBindingName

func DefaultRoleBindingName(assignee string) string

DefaultRoleBindingName build a default Role Binding name

func DefaultRoleName

func DefaultRoleName(assignee string) string

DefaultRoleName build a default Role name

func DefaultServiceAccountName

func DefaultServiceAccountName(assignee string) string

DefaultServiceAccountName build a default Service Account name

Types

type ModelMonitorComponent

type ModelMonitorComponent string

ModelMonitorComponent enum

const (
	Job             ModelMonitorComponent = "job"
	InferenceLogger ModelMonitorComponent = "inferenceLogger"
)

ModelMonitor fields

func (ModelMonitorComponent) String

func (c ModelMonitorComponent) String() string

String return ModelMonitorComponent as string

Jump to

Keyboard shortcuts

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