zed-industries/zed · error

no split specifications provided

Error message

no split specifications provided

What it means

Bailed by run_split when zero `<path>=<size>` split specifications remain after argument processing. The first argument without an `=` is treated as the optional input path; every remaining argument must be a spec. Passing only `input.jsonl` (or any argument set with no `=`-containing specs) leaves the spec list empty and triggers this bail.

Source

Thrown at crates/edit_prediction_cli/src/split_dataset.rs:247

    let (input_path, split_specs_raw): (Option<&Path>, &[PathBuf]) =
        if inputs.first().is_some_and(|p| {
            let s = p.to_string_lossy();
            !s.contains('=')
        }) {
            let first = inputs.first().map(|p| p.as_path());
            let first = if first == Some(Path::new("-")) {
                None
            } else {
                first
            };
            (first, &inputs[1..])
        } else {
            (None, inputs)
        };

    if split_specs_raw.is_empty() {
        bail!("no split specifications provided");
    }

    let specs: Vec<SplitSpec> = split_specs_raw
        .iter()
        .map(|p| parse_split_spec(&p.to_string_lossy()))
        .collect::<Result<Vec<_>>>()?;

    let lines = read_lines_from_input(input_path)?;
    let total_lines = lines.len();

    if total_lines == 0 {
        for spec in &specs {
            write_lines_to_file(&spec.path, &[])?;
        }
        return Ok(());
    }

    let mut grouped_lines = group_lines(&lines, args.stratify);

View on GitHub (pinned to f4178619ac)

Solutions

  1. Append at least one spec containing `=`, e.g. `ep split input.jsonl train.jsonl=80% valid.jsonl=rest`
  2. Verify each spec has the `<path>=<size>` shape where size is a count, a percentage, or `rest`
  3. Quote each spec as one shell word so `=` survives expansion

Example fix

# before
ep split input.jsonl

# after
ep split input.jsonl train.jsonl=80% valid.jsonl=rest
Defensive patterns

Strategy: validation

Validate before calling

let spec_count = args.iter().filter(|a| a.contains('=')).count();
if spec_count == 0 {
    // reject before running: at least one <path>=<size> spec is required
}

Try / catch

Validate that at least one argument contains '=' before invoking; if none does, the caller is passing only an input path and must add specs.

Prevention

When it happens

Trigger: Running `ep split input.jsonl` with no specs, or passing specs whose `=` was lost to quoting/expansion so everything got classified as the input path.

Common situations: Forgetting the specs half of the command; shell quoting that strips or splits on `=`; feeding a bare filename where a `path=size` pair was expected.

Understand the failure class

Background: "no subcommand specified" and "... is required": CLI errors when a required argument is missing — this error's family across 13 libraries.

Related errors


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