zed-industries/zed · error
usage: ep split [input.jsonl] train.jsonl=80% valid.jsonl=re
Error message
usage: ep split [input.jsonl] train.jsonl=80% valid.jsonl=rest
What it means
Bailed by run_split when `ep split` was invoked with no positional arguments at all. The command requires at least one `<path>=<size>` split spec (and optionally one leading input path); with an empty argument list it prints the usage line and exits with an error.
Source
Thrown at crates/edit_prediction_cli/src/split_dataset.rs:227
let file =
File::create(path).with_context(|| format!("failed to create '{}'", path.display()))?;
let mut writer = BufWriter::new(file);
for line in lines {
writeln!(writer, "{}", line)
.with_context(|| format!("failed to write to '{}'", path.display()))?;
}
writer
.flush()
.with_context(|| format!("failed to flush '{}'", path.display()))?;
Ok(())
}
pub fn run_split(args: &SplitArgs, inputs: &[PathBuf]) -> Result<()> {
if inputs.is_empty() {
bail!("usage: ep split [input.jsonl] train.jsonl=80% valid.jsonl=rest");
}
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)
};
View on GitHub (pinned to f4178619ac)
Solutions
- Re-run with input plus specs, e.g. `ep split input.jsonl train.jsonl=80% valid.jsonl=rest`
- If reading from stdin, you may omit the input path but must still pass at least one spec
- Check the calling script's variable expansion so empty arrays don't erase the arguments
Example fix
# before ep split # after ep split input.jsonl train.jsonl=80% valid.jsonl=rest
Defensive patterns
Strategy: validation
Validate before calling
if args.is_empty() {
// print usage and fail before spawning: split needs >= 1 spec
} Try / catch
Check the argument vector is non-empty before invoking; surface a usage string at the caller level so the tool's bail never fires.
Prevention
- Assert non-empty inputs when building the command programmatically
- Quote shell variables so empty values don't erase arguments
- Run the bare subcommand's --help when unsure of required arguments
When it happens
Trigger: Running bare `ep split`, or through a script where an unquoted empty shell variable expands to zero arguments.
Common situations: Shell scripts passing `"$INPUTS"`-style variables that are empty; misconfigured task runners dropping arguments; exploring the CLI without arguments expecting help output.
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
- no split specifications provided
- provide a run_id or --job-dir
- no run id given and the local run index is empty. Launch a r
- --languages and/or --extensions is required (use --list to s
- unknown teacher backend `{s}`. Valid options: sonnet45, sonn
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/bcf3845f201964f4.
Report an issue: GitHub.