Commit Graph
36 Commits
Author SHA1 Message Date
Ben Kunkle cd0b373501 ep_cli: Add filter languages subcommand (#47242)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-20 15:58:50 -05:00
Ben Kunkle 37185ea864 ep_cli: Fix "Too many open files" errors (#47243)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-20 15:41:31 -05:00
Max BrunsfeldandBen Kunkle a0728db61b Add --offset flag to ep cli (#47175)
Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-01-20 14:08:15 -05:00
Oleksiy Syvokon 9fce07599a ep: Make --provider optional, skip prediction when results exist (#47225)
When --provider is not provided, `ep` will now use whatever provider is
recorded in the data.

Release Notes:

- N/A
2026-01-20 17:26:37 +02:00
Oleksiy Syvokon 8e48a16193 Add ep parse-output command (#47220)
This command takes raw LLM outputs (`predictions.actual_output`) that
could be generated elsewhere and parses them into a canonical unified
diff (`predictions.actual_patch`).

This is useful for simplifying the evaluation pipeline and for rerunning
the parser without having to generate LLM outputs.

Release Notes:

- N/A
2026-01-20 17:12:58 +02:00
Oleksiy Syvokon 3e309abe59 ep: Fix teacher prompt formatting (#47172)
Release Notes:

- N/A
2026-01-19 20:57:56 +00:00
Oleksiy Syvokon f98acf4ca9 Make ep split-commit respect --failed=skip (#47150)
Release Notes:

- N/A
2026-01-19 17:26:41 +02:00
Max Brunsfeld 1468ee2ae5 Fix more errors found when retrieving context for a huge example batch (#47039)
Release Notes:

- N/A
2026-01-16 16:43:11 -08:00
afaccf9c67 Fix edit history clearing bug in ep (#47017)
We were including changes due to Buffer.reload in the edit history.

Release Notes:

- N/A

---------

Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-01-16 15:44:38 -08:00
3ce386a118 ep: Add 180 token editable region experiment (#46945)
Release Notes:

- N/A

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-01-15 17:46:22 -03:00
Oleksiy Syvokon a10fdfd2b8 ep: Combine PredictionProvider and ZetaVersion (#46896)
We can specify prompt version in the provider name itself, like this
`--provider zeta2:0113`.

This kind of tag will also be stored in the `provider` field of
jsonlines files.

This drops the `--version` parameter.


Release Notes:

- N/A
2026-01-15 14:00:21 -03:00
Max BrunsfeldandAgus Zubiaga ceecf82287 Allow EP synthesize command to take multiple repos (#46853)
Release Notes:

- N/A

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2026-01-15 01:23:40 +00:00
Max BrunsfeldandAgus Zubiaga 445c95aa3c Fix issues processing captured edit prediction examples (#46773)
Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2026-01-14 14:32:42 -08:00
20284e4f21 Introduce zeta2 format with cursor content in original order (#46732)
This one does `fim_prefix`, `fim_middle`, and `fim_suffix` in that
order, in the prompt, instead of putting the current middle last.

Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-01-13 21:53:44 +00:00
Oleksiy Syvokon f42d714d33 Add ep --failed=skip to exclude errored examples from output (#46453)
Release Notes:

- N/A
2026-01-09 14:45:08 +00:00
0f75c079a5 Edit prediction: teacher prompt improvements (#46392)
Release Notes:

- N/A

---------

Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-01-08 22:12:32 +00:00
Oleksiy Syvokon 11cfdb1e62 Add ep split subcommand for dataset splitting (#46364)
Adds a new `ep split` command that splits JSONL datasets into multiple
output files with stratification by `repository_url` when present.

Example usage:

  ep split input.jsonl train.jsonl=80% valid.jsonl=rest

Release Notes:

- N/A
2026-01-08 13:31:26 +00:00
Agus Zubiaga 42af91ddee ep cli: Resume from output file (#46293) 2026-01-07 21:50:46 -03:00
Oleksiy Syvokon 0136e41327 ep: Fix incorrect example count in failure summary (#46257)
The 'X of Y examples failed' message was counting completed steps/tasks
instead of actual examples. For example, with 2 examples each going
through Load and Context steps, it would report '1 of 3' instead of '1
of 2'.

Release Notes:

- N/A
2026-01-07 14:09:33 +00:00
Max Brunsfeld 8ca638150a Fix some issues with edit prediction CLI (#46197)
* Added `--repo` and `--name` flags for running only examples with a
specific name, or repo (substring matching)
* Fixed a race condition that caused hangs when running multiple
examples at the same repo and sha
* Fixed a bug where scoring was completely wrong because I had passed
the arguments to `apply_diff_to_string` in the wrong order
* The current evals now run quickly and without errors.

Release Notes:

- N/A
2026-01-06 14:11:19 -08:00
Agus Zubiaga a8bc84c43f ep cli: Include cursor file in errors (#46192)
Errors now include the cursor file path so we can just cmd+click it for
inspection

Release Notes:

- N/A
2026-01-06 21:16:56 +00:00
Oleksiy SyvokonandAgus Zubiaga efeea7973e Edit prediction changes (#46169)
1. Handle diffs with no trailing new lines 
2. ep: Don't assume workdir name in edit history paths
3. Fix `imitate_human_edits()` for pure insertions

Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2026-01-06 16:49:26 +00:00
Oleksiy Syvokon 92b0f144c0 Changes to make ep split-commits work (#46160)
1. `apply_diff` will create a file if the diff says so (by starting with
`--- /dev/null`)
2. Update examples format to match recent changes
3. `ep split-commits` can work with a stream of inputs and generate `n`
samples per input
4. Unicode handling fixes

Release Notes:

- N/A
2026-01-06 14:38:44 +00:00
Agus Zubiaga 583a479f77 ep cli: Load captured examples from Snowflake (#46102)
Release Notes:

- N/A
2026-01-06 10:40:13 -03:00
Oleksiy Syvokon 2a45dbf63e Add ep split-commit command (#46067)
Generates a training or evaluation example from a
chronologically-ordered commit. This is a port from the Python codebase
(except for the reorder_patch.rs, which was originally written in Rust
in).


Release Notes:

- N/A
2026-01-05 13:13:46 +02:00
Max Brunsfeld 9a79cb8ba1 Improve support for collecting edit prediction training and eval examples (#45914)
* Fix some bugs in capture of EP examples from running app
* Tweak markdown format for EP examples
    * Store repo and revision in TOML front matter
    * Represent cursor position using a comment line
* Allow multiple expected patches in evals
* Remove line-based scoring criteria for evals
* Add a `synthesize` subcommand to the EP cli that generates examples
from git commits

Release Notes:

- N/A
2026-01-03 16:08:35 -08:00
Max Brunsfeld b8e40e6fdb Add an action for capturing your last edit as an edit prediction example (#44841)
This PR adds a staff-only button to the edit prediction menu for
capturing your current editing session as edit prediction example file.

When you click that button, it opens a markdown tab with the example. By
default, the most recent change that you've made is used as the expected
patch, and all of the previous events are used as the editing history.

<img width="303" height="123" alt="Screenshot 2025-12-14 at 6 58 33 PM"
src="https://github.com/user-attachments/assets/600c7bf2-7cf4-4d27-8cd4-8bb70d0b20b0"
/>

Release Notes:

- N/A
2025-12-14 20:50:48 -08:00
Agus Zubiaga 60f4aa333b edit prediction cli: Improve error handling (#44718)
We were panicking whenever something went wrong with an example in the
CLI. This can be very disruptive when running many examples, and e.g a
single request fails. Instead, if running more than one example, errors
will now be logged alongside instructions to explore and re-run the
example by itself.

<img width="1454" height="744" alt="CleanShot 2025-12-12 at 13 32 04@2x"
src="https://github.com/user-attachments/assets/87c59e64-08b9-4461-af5b-03af5de94152"></img>


You can still opt in to stop as soon as en error occurs with the new
`--failfast` argument.

Release Notes:

- N/A
2025-12-12 14:15:58 -03:00
Agus Zubiaga 4d0e760b04 edit prediction cli: Progress output cleanup (#44708)
- Limit status lines to 10 in case `max_parallelism` is specified with a
grater value
- Handle logging gracefully rather than writing over it when clearing
status lines

Release Notes:

- N/A
2025-12-12 14:03:08 +00:00
Agus Zubiaga 610cc1b138 edit prediction cli: Cargo-style progress output (#44675)
Release Notes:

- N/A
2025-12-12 09:43:16 -03:00
Max Brunsfeld b871130220 Restructure concurrency in EP CLI to allow running many examples in big rust repos (#44673)
Release Notes:

- N/A
2025-12-12 01:58:53 +00:00
1cd7563f04 Add ep distill command, for generating edit prediction training examples (#44670)
Release Notes:

- N/A

---------

Co-authored-by: Oleksiy Syvokon <oleksiy@zed.dev>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-12-11 14:57:58 -08:00
Agus ZubiagaandMax Brunsfeld 37f2ac24b8 edit prediction cli: Skip worktree scan (#44658)
Release Notes:

- N/A

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-12-11 21:05:50 +00:00
25d74480aa Rework edit prediction CLI (#44562)
This PR restructures the commands of the Edit Prediction CLI (now called
`ep`), to support some flows that are important for the training
process:
* generating zeta2 prompt and expected output, without running
predictions
* scoring outputs that are generated by a system other than the
production code (to evaluate the model during training)

To achieve this, we've restructured the CLI commands so that they all
take as input, and produce as output, a consistent, uniform data format:
a set of one or more `Example` structs, expressible either as the
original markdown format, or as a JSON lines. The `Example` struct
starts with the basic fields that are in human-readable eval format, but
contain a number of optional fields that are filled in by different
steps in the processing pipeline (`context`, `predict`, `format-prompt`,
and `score`).

### To do

* [x] Adjust the teacher model output parsing to use the full buffer
contents
* [x] Move udiff to cli
* [x] Align `format-prompt` with Zeta2's production code
* [x] Change score output to assume same provider
* [x] Move pretty reporting to `eval` command
* [x] Store cursor point in addition to cursor offset
* [x] Rename `edit_prediction_cli2` -> `edit_prediction_cli` (nuke the
old one)

Release Notes:

- N/A

---------

Co-authored-by: Oleksiy Syvokon <oleksiy@zed.dev>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-12-10 17:36:51 -08:00
d312d59ace Add zeta distill command (#44369)
This PR partially implements a knowledge distillation data pipeline.

`zeta distill` gets a dataset of chronologically ordered commits and
generates synthetic predictions with a teacher model (one-shot Claude
Sonnet).

`zeta distill --batches cache.db` will enable Message Batches API. Under
the first run, this command will collect all LLM requests and upload a
batch of them to Anthropic. On subsequent runs, it will check the batch
status. If ready, it will download the result and put them into the
local cache.


Release Notes:

- N/A

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-12-08 15:13:22 +02:00
42583c1141 Reorganize edit prediction code and remove old experiments (#44187)
Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-12-04 15:56:57 -08:00