Repository navigation
Conversation
Add the "with Python tools" setting from the system card — the model renders its
own candidate and verifies it against the target before submitting. Default stays
single-shot.
Round 1 is the existing single-shot; later rounds render the candidate in the same
4 views (reusing scoring/views) and show it to the model alongside the target,
keeping a revision only if it still executes. Voxel-IoU scoring is unchanged.
Enable per-config with `render_verify: {rounds: N}`.
BenchCAD
force-pushed
the
feat/render-verify-eval-mode
branch
from
June 26, 2026 07:28
aff13fc to
649e15e
Compare
Owner
Author
|
Closing as superseded. This branch targets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds CodeGen's render-and-verify eval mode — the "with Python tools" setting reported for this task in the model system card. In vanilla Vision2Code the model sees the 4-view target once and writes CadQuery single-shot. Here it is additionally allowed to render its own candidate and visually verify it against the target before submitting, which is the setting frontier models are evaluated under.
Off by default — existing single-shot runs are unchanged.
How it works
pipeline/render_verify.py :: run_record_with_tools(record, …, rounds=N):run_record: build the target prompt, call the model, execute its program to a STEP.scoring.views.composite_for_step), show the model[target, candidate]with a refine prompt asking it to correct view-by-view mismatches, and keep the revision only if it still executes to a valid STEP. A failed/transient API call submits the best-so-far.results.jsonlrow is the same shape plus aroundsfield (attempts actually used).It reuses the exact renderer, executor and IoU scorer from
scoring/, so the only new behavior is the refinement loop.Integration
main.pyreadsrender_verify.roundsfrom the config and dispatches:rounds >= 2→run_record_with_tools, else the originalrun_record. The run header printsmode: render-verify (N rounds)/single-shot.configs/prod.yamlandCodeGen/README.mddocument usage.Testing
Unit (
tests/test_render_verify.py, 3 tests, mocked externals) — pass:Real end-to-end smoke (gemini-2.5-flash, 1 record,
rounds: 2):results.jsonl row:
{"record_id":"demo1","model":"gemini-2.5-flash","status":"ok","iou":0.6364, "rounds":2,"lat_s":47.9,"err":null, "code_path":"…/demo1.py","step_path":"…/demo1.step","png_path":"…/demo1.png"}rounds: 2and the emitteddemo1_cand.pngconfirm the verify round actually ran (candidate rendered and fed back), not a single-shot fallback.Notes
rounds(N rounds ≈ N model calls); the default config stays single-shot.<rid>_cand.png) is left underoutputs/for inspection.