zed-industries/zed · error

no predictions available (run predict first)

Error message

no predictions available (run predict first)

What it means

Bailed by the repair step when `example.predictions` is empty. Repair sends the first prediction's `actual_output` to the model as the teacher response to correct, so at least one prediction must exist. The guard fires when repair runs before the predict step, or when predict stored no predictions for the example.

Source

Thrown at crates/edit_prediction_cli/src/repair.rs:298

    args: &RepairArgs,
    example_progress: &ExampleProgress,
) -> Result<()> {
    if has_successful_repair(example) {
        return Ok(());
    }

    if !needs_repair(example, args.confidence_threshold) {
        return Ok(());
    }

    run_parse_output(example).context("Failed to execute run_parse_output")?;

    if example.prompt_inputs.is_none() {
        anyhow::bail!("prompt_inputs missing (run context retrieval first)");
    }

    if example.predictions.is_empty() {
        anyhow::bail!("no predictions available (run predict first)");
    }

    let teacher_prompt = example
        .prompt
        .as_ref()
        .context("prompt missing (run format_prompt first)")?;

    let teacher_response = &example.predictions[0].actual_output;
    if teacher_response.is_empty() {
        anyhow::bail!("teacher response is empty (run predict first)");
    }

    let step_progress = example_progress.start(Step::Repair);

    let model = model_for_backend(args.backend);
    let repair_message = build_repair_message(example).context("Failed to build repair message")?;

    step_progress.set_substatus("generating");

View on GitHub (pinned to f4178619ac)

Solutions

  1. Run the predict step for the examples before repair
  2. Check the example JSONL to confirm predictions were persisted (non-empty `predictions` array)
  3. If predict is failing for these examples, fix the provider error it reports first
Defensive patterns

Strategy: validation

Validate before calling

if example.predictions.is_empty() {
    // run predict for this example before repair
    anyhow::bail!("cannot run repair: no predictions, run predict first");
}

Try / catch

Catch per example, classify as 'missing prerequisite', and route the example back to the predict stage instead of failing the run.

Prevention

When it happens

Trigger: Invoking `ep repair` on examples whose `predictions` array is empty: predict never ran, was skipped for that example (e.g. provider errors), or the run was resumed from a file written before predict.

Common situations: Stage reordering in scripts; predict step skipping failed requests and leaving the array empty; stale intermediate files.

Related errors


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/25ce0334f3df5ec1. Report an issue: GitHub.