Documentation ¶
Index ¶
- Constants
- Variables
- func ConfigureRoutes(routeGroup *gin.RouterGroup, mdService md_service.Service, ...)
- func ValidateAndParseCursor(c *gin.Context, cursor *int) (err error)
- type ModelDeploymentController
- type ModelDeploymentEventGetter
- type ModelDeploymentValidator
- type ModelRouteController
- type MrValidator
- type RoutesEventGetter
Constants ¶
View Source
const ( GetModelDeploymentURL = "/model/deployment/:id" GetModelDeploymentDefaultRouteURL = "/model/deployment/:id/default-route" GetAllModelDeploymentURL = "/model/deployment" CreateModelDeploymentURL = "/model/deployment" UpdateModelDeploymentURL = "/model/deployment" DeleteModelDeploymentURL = "/model/deployment/:id" EventsModelDeploymentURL = "/model/deployment-events" IDMdURLParam = "id" )
View Source
const ( ValidationMdErrorMessage = "Validation of model deployment is failed" EmptyImageErrorMessage = "empty image parameter" EmptyPredictorErrorMessage = "empty predictor parameter" NegativeMinReplicasErrorMessage = "minimum number of replicas parameter must not be less than 0" NegativeMaxReplicasErrorMessage = "maximum number of replicas parameter must not be less than 1" MaxMoreThanMinReplicasErrorMessage = "maximum number of replicas parameter must not be less than minimum number " + "of replicas parameter" ReadinessProbeErrorMessage = "readinessProbeInitialDelay must be non-negative integer" LivenessProbeErrorMessage = "livenessProbeInitialDelay must be non-negative integer" UnknownNodeSelector = "node selector %v is not presented in ODAHU config" DefaultRolePrefix = "role-" MaxIDLengthErrorMessage = "model deployment ID should not exceed 46 symbols" )
View Source
const ( GetModelRouteURL = "/model/route/:id" GetAllModelRouteURL = "/model/route" CreateModelRouteURL = "/model/route" UpdateModelRouteURL = "/model/route" DeleteModelRouteURL = "/model/route/:id" EventsModelRouteURL = "/model/route-events" IDMrURLParam = "id" )
View Source
const ( URLPrefixEmptyErrorMessage = "empty URL Prefix" EmptyTargetErrorMessage = "model deployment targets must contain at least one element" OneTargetErrorMessage = "it must have 100 weight or nil value if there is only one target" MissedWeightErrorMessage = "weights must be present if there are more than one model deployment targets" TotalWeightErrorMessage = "total target weight does not equal 100" URLPrefixSlashErrorMessage = "the URL prefix must start with slash" ForbiddenPrefix = "the URL prefix %s is forbidden" InvalidCustomPrefix = "custom URL prefix must start with %s" ErrorMessageTemplate = "%s: %s" ValidationMrErrorMessage = "Validation of model route is failed" )
Variables ¶
View Source
var ( MdDefaultMinimumReplicas = int32(0) MdDefaultMaximumReplicas = int32(1) MdDefaultLivenessProbeInitialDelay = int32(2) MdDefaultReadinessProbeInitialDelay = int32(2) )
View Source
var ( MaxWeight = int32(100) ForbiddenPrefixes = []string{ "/model", "/feedback", } )
Functions ¶
func ConfigureRoutes ¶
func ConfigureRoutes(routeGroup *gin.RouterGroup, mdService md_service.Service, mdEventsReader ModelDeploymentEventGetter, mrService mr_service.Service, mrEventsReader RoutesEventGetter, deploymentConfig config.ModelDeploymentConfig, gpuResourceName string)
Types ¶
type ModelDeploymentController ¶
type ModelDeploymentController struct {
// contains filtered or unexported fields
}
type ModelDeploymentValidator ¶
type ModelDeploymentValidator struct {
// contains filtered or unexported fields
}
func NewModelDeploymentValidator ¶
func NewModelDeploymentValidator( modelDeploymentConfig config.ModelDeploymentConfig, gpuResourceName string, ) *ModelDeploymentValidator
func (*ModelDeploymentValidator) ValidatesMDAndSetDefaults ¶
func (mdv *ModelDeploymentValidator) ValidatesMDAndSetDefaults(md *deployment.ModelDeployment) (err error)
type ModelRouteController ¶
type ModelRouteController struct {
// contains filtered or unexported fields
}
type MrValidator ¶
type MrValidator struct {
// contains filtered or unexported fields
}
func NewMrValidator ¶
func NewMrValidator(mdService md_service.Service) *MrValidator
func (*MrValidator) ValidatesAndSetDefaults ¶
func (mrv *MrValidator) ValidatesAndSetDefaults(mr *deployment.ModelRoute) (err error)
type RoutesEventGetter ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.