Predictive scaler trigger configuration
Configure prediction trigger metadata below. MetricPredictor API reference describes source, model and training fields; Predictive scaling explains fit and quality limits.
Use the Kedify build of KEDA for this trigger. Keep a live-demand trigger while evaluating forecast quality.
Use and verify
Section titled “Use and verify”Enable predictive scaling and forecast a sample workload before applying this trigger to production. Inspect the selected model, source units, horizon and predicted versus actual values. For failures, use predictive diagnostics.
Trigger Specification
Section titled “Trigger Specification”The MetricPredictor custom resource makes sure the model can get its metric data and can be periodically trained. However, if we want to actually use the model for prediction, one has to reference it from a Kedify predictive scaler as one of the triggers.
triggers: - name: valueFromTheFuture type: kedify-predictive metadata: modelName: app*e-shop horizon: 15m modelMapeThreshold: "80" estimateType: upper-estimate targetValue: "10"Parameter list:
Section titled “Parameter list:”modelName: This name must match the model name created bympresource (implicitly${namespace}*${name-of-mp})horizon(optional): Prediction horizon - what will be the estimated value in time"now+horizon"? Example:150sDefault: if not specified, default frommpdefinition is usedmodelMapeThreshold(optional): Maximum accepted Mean Absolute Percentage Error (MAPE) on held-out data. If the model exceeds this threshold, the scaler returnshighMapeDefaultReturnValue. Lower values make acceptance stricter; they do not improve model precision. Default:40.highMapeDefaultReturnValue(optional): This is the default value returned when model is not performing well or has not been trained yet. Default0estimateType(optional): ML Model returns the estimated value but also upper and lower bounds. Allowed values:upper-estimate, lower-estimate, the-estimateDefault:the-estimatehttpMethod(optional): What HTTP method should be used when asking a model for prediction. Allowed values:GET, POST. DefaultGETurl(optional): Endpoint used to request a prediction. Default:http://kedify-predictor.keda.svc:8000/models/{modelName}/predict?horizon={horizon}.valueLocation(optional): JSON path that should be used for obtaining the predicted value from the HTTP request (without the leading dot). Default: based on theestimateTypevalue -forecast.0.yhatorforecast.0.yhat_{lower,upper}unsafeSsl & authOptions: Same set of configuration options as described for metrics-api scaler.targetValue: Common configuration option for all KEDA scalersactivationTargetValue(optional): If predicted value is below this threshold the scaler will be considered as not active. Used for 0-1 scaling. Default0