# Forecasts are missing or inaccurate

Diagnose forecasting separately from live autoscaling. Keep a working live-demand path while testing prediction quality.

## Evidence, remedy and recovery check

### No history or model

Set `NS` and `PREDICTOR` to the MetricPredictor’s namespace and name:

```bash
NS=my-app
PREDICTOR=my-predictor
kubectl get metricpredictor.keda.kedify.io "$PREDICTOR" -n "$NS" -o json | \
  jq '{spec: .spec, source: .status.source, modelName: .status.modelName, conditions: .status.conditions}'
kubectl describe metricpredictor.keda.kedify.io "$PREDICTOR" -n "$NS"
```

Check `status.source` against the configured KEDA, OTel, CSV or Prometheus input. Read condition `reason`/`message` for input errors. A populated `modelName` alone does not establish recent ingestion or forecast quality; inspect timestamped data in [model exploration](https://docs.kedify.io/how-to/predictive-scaler-model-exploration/).

Follow [predictor enablement](https://docs.kedify.io/how-to/predictive-scaler-installation/) and [OTLP ingestion](https://docs.kedify.io/how-to/predictive-scaler-otlp/); verify timestamped samples before retraining.

### Training fails

For job-based training, locate the failing Job and storage in the Predictor installation namespace:

```bash
PREDICTOR_NS=keda
kubectl get jobs,pods,pvc -n "$PREDICTOR_NS"
kubectl get events -n "$PREDICTOR_NS" --sort-by=.metadata.creationTimestamp
# Set this to the training Job reported above.
TRAINING_JOB=my-training-job
kubectl logs -n "$PREDICTOR_NS" job/"$TRAINING_JOB" --all-containers=true --tail=100
```

Expect bound PVCs, schedulable training pods and a completed training Job. `FailedMount`, Pending pods or training errors require correcting storage, placement or input data. If training runs in-process, inspect the Predictor pod’s logs instead. See [storage requirements](https://docs.kedify.io/how-to/predictive-scaler-installation/).

Correct the reported input/storage failure; recheck model status without deleting history as a first remedy.

### Forecast is inaccurate

Compare forecast and actual values for equivalent units, horizon and held-out periods. Look for missing samples, one-off incidents or changed seasonality.

Use [model exploration](https://docs.kedify.io/how-to/predictive-scaler-model-exploration/) to inspect quality. Preserve live scaling and reject the forecast if it adds no useful lead time.

### Forecast exists but replicas do not rise

Inspect the workload’s ScaledObject and generated HPA (for the HPA path):

```bash
SCALEDOBJECT=my-app
kubectl get scaledobject "$SCALEDOBJECT" -n "$NS" -o yaml
kubectl get hpa -n "$NS" -l "scaledobject.keda.sh/name=$SCALEDOBJECT"
```

The predictive trigger’s model binding must match the trained model. Compare current/target metrics and desired replicas with the trigger threshold, forecast offset and `maxReplicaCount`. If HPA shows unknown metrics, use [workload diagnostics](https://docs.kedify.io/troubleshooting/workload-scaling/). For KPA-owned workloads, inspect KPA status instead of expecting a live HPA control loop.

Compare [trigger metadata](https://docs.kedify.io/reference/predictive-scaler/) with [MetricPredictor fields](https://docs.kedify.io/reference/kubernetes-api/metricpredictor/); verify desired and ready capacity separately.

### Replicas increase too late

Measure image/model startup and node provisioning time against forecast lead time.

Use [predictable-demand choices](https://docs.kedify.io/guides/prepare-for-demand/) and node capacity preparation only when readiness is the bottleneck.

## Verify recovery

Confirm history has recent timestamps, the model trains successfully, and the selected forecast reaches the ScaledObject. Compare predicted versus observed demand before relying on forecast-driven replicas.

For unresolved failures, [Collect diagnostics for support](https://docs.kedify.io/troubleshooting/collecting-kedify-configuration/) with versions, namespace/target, timestamps, relevant conditions and a redacted configuration.

Related: [Enable predictive scaling](https://docs.kedify.io/how-to/predictive-scaler-installation/) · [Forecast and scale a sample workload](https://docs.kedify.io/how-to/predictive-scaler-example/) · [Explore and tune forecast models](https://docs.kedify.io/how-to/predictive-scaler-model-exploration/) · [Predictive scaler trigger configuration](https://docs.kedify.io/reference/predictive-scaler/) · [MetricPredictor API reference](https://docs.kedify.io/reference/kubernetes-api/metricpredictor/).

---
Canonical: https://docs.kedify.io/troubleshooting/predictive-scaling/
Source: src/content/docs/troubleshooting/predictive-scaling.md
Documentation index: https://docs.kedify.io/llms.txt
