Skip to content

feat: add vf-run, a minimal in-process runner - #3047

Merged
mikasenghaas merged 3 commits into
mainfrom
feat/vf-run
Nov 3, 2026
Merged

mikasenghaas merged 3 commits into
mainfrom
feat/vf-run

Conversation

@mikasenghaas

@mikasenghaas mikasenghaas commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add vf-run, a minimal in-process runner: uv run vf-run <taskset> [-m <model>] [-n <tasks>] [-r <rollouts>] [-c <concurrency>] [-o <dir>] [--dry-run].
    • It runs the selected episodes in one process and appends each one to <output_dir>/<run.dir>/traces.jsonl as it completes.
    • It prints one summary line (3/4 episodes ok, mean reward 0.750: <run-dir>) and exits 1 when any episode is not ok.
    • It has no dashboard, resume, attempt logs, or platform push.
    • When one rollout fails, the taskset raises, or the run is interrupted, it cancels the other rollouts and waits for them to unwind before serving teardown.
    • It refuses a run directory that already holds episodes, in the CLI and in run_episodes.
    • --dry-run resolves the typed config (plugin discovery included), writes configs/resolved/run.json, and exits.
  • Run the integration suite through it. The run fixture calls run_episodes, and the examples smoke test runs the vf-run CLI.
  • Move RunConfig and default_run_name to verifiers/v1/configs/cli/run.py, and type output_path with a RunOutput protocol. vf-eval, vf-validate, and vf-gepa keep working unchanged.

Merge order:

  1. This PR. Its merge publishes a dev release with vf-run.
  2. feat: run the env smoke tests through vf-run prime-envs#1053 and PrimeIntellect-ai/prime-envs-private#373 switch the env smoke tests to vf-run.
  3. refactor(eval): remove vf-eval #2610 removes vf-eval.

Verification

  • pytest tests/unit: passes, including the new tests/unit/cli/test_run.py.
  • pytest tests/integration/test_examples.py -k "reverse_text or interception or kuhn_poker" through the vf-run CLI: 6 passed.
  • Fixture-based integration tests (test_single_turn, test_multi_turn, test_parallel, -k "subprocess or null"): 6 passed.
  • End-to-end CLI scenarios against Prime Inference (internal/deepseek-v4.1-flash), 22 checks:
    • reverse-text -n 2 -r 2 (null harness): exit 0, 4 episodes, mean reward 1.0. The summary line, configs/resolved/run.json, and one eval run id on every episode and trace are all present.
    • kuhn-poker -n 1 (multi-agent): exit 0, one episode with several traces.
    • Unknown model: exit 1, 0/2 episodes ok, both errored episodes saved.
    • Existing run directory: refused, traces unchanged.
    • --dry-run writes only the config, and vf-run @ <run-dir>/configs/resolved/run.json re-runs it. A TOML @ run.toml also runs.
    • An infinite taskset without -n is refused. No arguments and a missing taskset print the usage.
    • vf-replay <run-dir> re-scores vf-run output.
    • SIGINT during a 120-rollout run (bash harness, subprocess runtime): exit 130, cleanup ran, the 8 finished episodes were kept, and no processes were orphaned.

🤖 Generated with Claude Code

vf-run runs a taskset's episodes in-process, appends them to
traces.jsonl, prints one summary line, and exits non-zero when any
episode is not ok. It has no dashboard, resume, or attempt logs, so CI
and quick local checks can call it directly.

The integration fixtures and the examples smoke test now run through
it. RunConfig and default_run_name move to configs/cli/run.py so they
outlive the eval CLI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9276d0d. Configure here.

Comment thread verifiers/v1/cli/run.py Resolved
@macroscopeapp

macroscopeapp Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 1bbc5f6

Macroscope's review found this PR approvable — Adds an opt-in in-process runner that saves traces and reports episode outcomes, reusing existing environment and storage APIs. Existing execution behavior remains unchanged, with result-directory protection and cancellation cleanup limiting the new path’s risk.

You can add or adjust custom eligibility rules. Learn more.

A failed rollout or a first Ctrl-C surfaced from gather while its
siblings kept running, so serving teardown could start under them and
leave sandboxes or tool servers behind. Cancel the rest and wait for
them to unwind before teardown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread verifiers/v1/cli/run.py Resolved
Comment thread verifiers/v1/cli/run.py Resolved
run_episodes now refuses a run directory that already holds episodes,
so a direct call cannot truncate an earlier run's traces.jsonl. Rollouts
are scheduled inside the cancellation guard, so a lazy taskset that
raises mid-iteration does not leave started rollouts running past
serving teardown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread verifiers/v1/cli/run.py Resolved
@mikasenghaas
mikasenghaas merged commit cf8a464 into main Nov 3, 2026
37 checks passed
@mikasenghaas
mikasenghaas deleted the feat/vf-run branch November 3, 2026 02:07
mikasenghaas added a commit to PrimeIntellect-ai/prime-envs that referenced this pull request Nov 3, 2026
## Summary

- Run `test_compatibility` (`--dry-run` config check) and `test_eval`
(one capped rollout) through `vf-run`, the minimal in-process runner
from PrimeIntellect-ai/verifiers#3047.
- Read the episode before checking the exit code. `vf-run` exits
non-zero when the episode is not ok, so a failed rollout still reports
its errors and traces.
- Raise every env's verifiers floor to `>=0.4.1.dev142`, the first dev
release with `vf-run`.
- Drop the verifiers git pins, so `main` resolves verifiers from the
package index:
- `apex_agents` (`695a28a`) landed on main in
PrimeIntellect-ai/verifiers#3020.
- `group_wise_judge` (`02bc061`) pinned the open verifiers#2975 branch.
The `best_of_n_judge` env it extends is now on main.
- Remove run commands from the READMEs, so they no longer go stale when
the runner changes. Install steps and env settings stay, and facts a
command carried are restated as settings. Drop `push = false` from the
`group_wise_judge` example config.

The eval CLI calls on `main` already fail against the newest dev
release. That release has no `--no-push` flag, so they fail with `Extra
inputs are not permitted`.

## Verification

- Before: `CI_TASKSET=mmlu_pro pytest tests/test_envs.py` on `main`
fails `test_compatibility` with `--no-push: Extra inputs are not
permitted`.
- After: the same run against the verifiers#3047 branch passes
`test_compatibility[mmlu_pro]` and `test_eval[mmlu_pro]`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- Macroscope's pull request summary starts here -->
<!-- Macroscope will only edit the content between these invisible
markers, and the markers themselves will not be visible in the GitHub
rendered markdown. -->
<!-- If you delete either of the start / end markers from your PR's
description, Macroscope will append its summary at the bottom of the
description. -->
> [!NOTE]
> ### Run smoke tests through `vf-run` and bump `verifiers` to
`0.4.1.dev142`
> - Compatibility and smoke-evaluation tests in
[test_envs.py](https://github.com/PrimeIntellect-ai/prime-envs/pull/1053/files#diff-322278bedd5f93c63d9ecb9703956bc1b75262db3c52e4432954b5ad4f080e17)
now invoke the installed `vf-run` executable with a generated config,
instead of importing the eval Python entry point. The `--no-rich`,
`--no-push`, and `--no-push` style flags are gone.
> - Raises the minimum `verifiers` version to `0.4.1.dev142` across all
environment `pyproject.toml` files, and drops the Git source overrides
in `group_wise_judge` (rev `02bc061`) and `apex_agents` (rev `695a28a`).
> - Removes `vf-eval` command examples from environment READMEs and the
top-level
[README.md](https://github.com/PrimeIntellect-ai/prime-envs/pull/1053/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5),
replacing them with inline config guidance.
> - Behavioral Change: `test_eval` now fails when no trace file or first
trace line is produced, and checks the `vf-run` exit code after
validating the first episode's `ok` field. `examples/deepseek.toml` in
`group_wise_judge` no longer sets `push = false`, so runs with that
config may push unless overridden.
>
> <!-- Macroscope's review summary starts here -->
>
> <sup><a href="https://app.macroscope.com">Macroscope</a> summarized
29da024.</sup>
> <!-- Macroscope's review summary ends here -->
>
<!-- Macroscope's pull request summary ends here -->

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
mikasenghaas added a commit that referenced this pull request Nov 3, 2026
## Summary

- Remove the `vf-eval` console script and its stack:
`verifiers/v1/cli/eval/` (main, runner, resume, deprecation hint), the
Rich eval dashboard (`cli/dashboard/eval.py`), and
`verifiers.v1.configs.cli.eval`.
- Type `output_path` with the `RunOutput` protocol only. Drop the
per-attempt log helpers that only the eval CLI used.
- Point docs, `AGENTS.md`, and env docstrings at `vf-validate` for
model-free checks, at `vf-run` for a few quick episodes, and at
prime-rl's `uv run eval` for full evaluations. Delete
`docs/evaluation.md` and its nav entry.

`vf-run` (#3047) replaces `vf-eval` in CI. prime-envs and
prime-envs-private already call `vf-run`.

## Breaking

- `vf-eval` no longer exists. Use `vf-run` for quick runs, or prime-rl's
`uv run eval` for full evaluations.
- `vf-eval --resume` and the Rich eval dashboard go away with it.
`vf-run --dry-run` still writes the resolved config.
- `verifiers.v1.configs.cli.eval` is gone. Import `RunConfig` and
`default_run_name` from `verifiers.v1.configs.cli.run`.

## Verification

- `pytest tests/unit`: passes.
- `uv run vf-run --help`: works; no `vf-eval` references remain in code,
docs, or configs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **High Risk**
> This is a breaking CLI removal: anything still invoking `vf-eval`,
`--dry-run`, or `--resume` on eval must migrate to prime-rl, `vf-run`,
or `vf-validate`.
> 
> **Overview**
> **Removes the bundled `vf-eval` command** and its stack: console entry
in `pyproject.toml`, `verifiers/v1/cli/eval/*` (main, runner, resume),
`EvalConfig`, the Rich live eval dashboard (`cli/dashboard/eval.py`),
and eval-only log helpers in `cli/output.py`. Run directory naming now
goes through a **`RunOutput` protocol** plus shared **`RunConfig` /
`default_run_name`** in `configs/cli/run` (still used by `vf-gepa`,
`vf-validate`, and `vf-run`).
> 
> **Docs and contributor guidance** drop `docs/evaluation.md` and
retarget workflows: **`vf-validate`** for setup/gold/no-op checks,
**`vf-run`** for a few in-process model episodes, and **prime-rl's `uv
run eval`** for full evaluations. CLI count in getting started goes from
six to five commands.
> 
> Tests and comments shed **`EvalConfig`** dependencies (e.g. replay
fixtures build minimal JSON on disk). GEPA and client docstrings stop
referencing `run_eval` / `vf-eval`.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
2e0ab91. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

<!-- Macroscope's pull request summary starts here -->
<!-- Macroscope will only edit the content between these invisible
markers, and the markers themselves will not be visible in the GitHub
rendered markdown. -->
<!-- If you delete either of the start / end markers from your PR's
description, Macroscope will append its summary at the bottom of the
description. -->
> [!NOTE]
> ### Remove the `vf-eval` CLI command and its eval modules
> - Deletes the `verifiers.v1.cli.eval` package, including `run_eval`,
resume helpers, the in-process runner, and the eval dashboard; removes
the `vf-eval` console script from
[pyproject.toml](https://github.com/PrimeIntellect-ai/verifiers/pull/2610/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711)
> - Deletes `EvalConfig` and `RichConfig` from the eval CLI config
module, and removes per-attempt log helpers (`create_attempt_log_dir`,
`attempt_log_file`) from
[output.py](https://github.com/PrimeIntellect-ai/verifiers/pull/2610/files#diff-07fce45dd0fa633f34d25e19962ab801b705a509774833de0d81bfe872787e8b)
> - Updates docs and contributor guidance to point at `vf-validate` and
`vf-run` instead; deletes the standalone evaluation guide and its nav
entries
> - Risk: Behavioral Change: `vf-eval` no longer exists after install;
check remaining imports of `EvalConfig`, `PRIME_RL_HINT`, and the
dashboard `eval` export if you have out-of-tree callers.
[test_replay.py](https://github.com/PrimeIntellect-ai/verifiers/pull/2610/files#diff-794bbe425d9cf4cae922189a5bf174d012fb6cd018f8c4f1616546535d012e8a)
now writes a minimal resolved-config JSON instead of an `EvalConfig`
>
> <!-- Macroscope's review summary starts here -->
>
> <sup><a href="https://app.macroscope.com">Macroscope</a> summarized
2e0ab91.</sup>
> <!-- Macroscope's review summary ends here -->
>
<!-- Macroscope's pull request summary ends here -->

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants