Official Codebase of 3DCodeVerse
Python
spatial/gallery/reference: rig-name refs follow D47; legacy names kept for stored runs
gaoypeng813e0f52cbfd
diff --git a/harness/bench/_fixed_eval.py b/harness/bench/_fixed_eval.pyindex e0b314f4..bca04a91 100644--- a/harness/bench/_fixed_eval.py+++ b/harness/bench/_fixed_eval.py@@ -1,7 +1,7 @@"""The fixed evaluator shared by every arm of ``bench/compare_backends.py``.``FixedEvaluator.evaluate(ws, spec)``: the cell's runtime lint + build → ``measure_glb``-→ connectivity gate → 8-view ``render_glb`` (articulated: + joint sweep + pose sheet;+→ connectivity gate → 14-view ``render_glb`` (articulated: + joint sweep + pose sheet;graphics: the frame sheet) → ``judge_for(spec)`` — a ``VlmJudge`` (or ``LikenessJudge``for graphics with reference photos) on ``rubric_for(spec)``, the track's ``TRACK_INFO``rubric, the ONE track→rubric mapping of the compare bench. The judge's acceptance checklist is the brief'sdiff --git a/harness/bench/compare_backends.py b/harness/bench/compare_backends.pyindex b1723d47..8d0d4cca 100644--- a/harness/bench/compare_backends.py+++ b/harness/bench/compare_backends.py@@ -18,7 +18,7 @@ ArmsEvery arm ends with a ``src/model.py`` that is copied into a fresh eval workspaceand scored by the SAME fixed evaluator: BlenderRuntime lint+build → measure →-connectivity gate → 8-view ``render_glb`` → ``VlmJudge(static_object_v1, judge,+connectivity gate → 14-view ``render_glb`` → ``VlmJudge(static_object_v1, judge,n_samples=2)`` whose acceptance checklist is the battery's ``must_have`` list.A failed build (or unparseable answer) scores 0 with the error recorded. Then apairwise arena (``PairwiseJudge``, same judge model, both orders) runs everydiff --git a/harness/codeverse/gallery/index.py b/harness/codeverse/gallery/index.pyindex ead8db33..c09571a8 100644--- a/harness/codeverse/gallery/index.py+++ b/harness/codeverse/gallery/index.py@@ -101,8 +101,10 @@ def best_sheet(ws: Workspace, rec: RunRecord) -> str:#: view names that make the best single thumbnail, most telling first. A ¾ view-#: shows silhouette *and* depth; a flat orthographic front hides both.-HERO_PREFERENCE = ("front_right_34", "back_left_34", "low_front_left", "front")+#: shows silhouette *and* depth; a flat orthographic front hides both. The ``*_34``+#: names are the pre-D47 rig, kept because the gallery serves stored runs.+HERO_PREFERENCE = ("front_right_high", "back_left_high", "front_right_low",+ "front_right_34", "back_left_34", "low_front_left", "front")def hero_view(ws: Workspace, rec: RunRecord) -> tuple[str, str, int]:diff --git a/harness/codeverse/judges/vlm_judge.py b/harness/codeverse/judges/vlm_judge.pyindex 86fbe692..53a0a3c8 100644--- a/harness/codeverse/judges/vlm_judge.py+++ b/harness/codeverse/judges/vlm_judge.py@@ -257,8 +257,10 @@ IOU_LOW, IOU_HIGH = 0.25, 0.85#: (unreliable mask, or a reference whose proportions contradict the brief)NEUTRAL_SCORE = 0.5-#: views handed to the mismatch pass (front-ish first, then a 3/4 and a side)-DIFF_VIEW_NAMES: tuple[str, ...] = ("front", "front_right_34", "front_left_34", "right", "left")+#: views handed to the mismatch pass (front-ish first, then a 3/4 and a side);+#: ``*_34`` names are the pre-D47 rig, kept for re-judging stored runs.+DIFF_VIEW_NAMES: tuple[str, ...] = ("front", "front_right_high", "front_left_high", "right", "left",+ "front_right_34", "front_left_34")_ENV_DIFF = "CV3D_REFERENCE_DIFF"@@ -304,7 +306,7 @@ class ReferenceJudge(VlmJudge):*,rubric: str | Rubric = "reference_v1",silhouette_fn: SilhouetteFn | None = None,- front_view_names: tuple[str, ...] = ("front", "front_right_34"),+ front_view_names: tuple[str, ...] = ("front", "front_right_high", "front_right_34"),best_view: bool = True,diff: bool = True,diff_model: Any | None = None,diff --git a/harness/codeverse/spatial/silhouette.py b/harness/codeverse/spatial/silhouette.pyindex 1ad9dc95..6105b3a3 100644--- a/harness/codeverse/spatial/silhouette.py+++ b/harness/codeverse/spatial/silhouette.py@@ -205,8 +205,13 @@ def silhouette_aspect(path: Path | str) -> float:#: render views a reference photo could plausibly have been shot from — a straight-on#: studio elevation matches ``front``/``right``/``left``/``back``, a 3/4 product shot-#: matches ``*_34``. ``top`` and ``low_front_left`` are never a product-shot camera.-CANDIDATE_VIEWS: tuple[str, ...] = ("front", "front_right_34", "right", "left", "back", "back_left_34")+#: matches the ``*_high`` ring. ``top``, ``bottom`` and the low ring are never a+#: product-shot camera. The ``*_34`` names are the pre-D47 rig, kept so stored runs+#: (``3dcv judge <old-slug>``, calibration replays) still match their own cameras.+CANDIDATE_VIEWS: tuple[str, ...] = (+ "front", "front_right_high", "front_left_high", "right", "left", "back", "back_left_high",+ "front_right_34", "back_left_34", # legacy pre-D47 runs+)def best_view_match(diff --git a/harness/codeverse/spatial/tool_common.py b/harness/codeverse/spatial/tool_common.pyindex 39dff4f1..7ff954ec 100644--- a/harness/codeverse/spatial/tool_common.py+++ b/harness/codeverse/spatial/tool_common.py@@ -165,7 +165,7 @@ def resolve_views(names: Sequence[str]) -> list[ViewPreset]:raise ToolUsageError(f"unknown view {n!r}; choose from {list(VIEW_BY_NAME)}", "render_views(views=['front', 'top'])")out.append(v)if not out:- raise ToolUsageError("views must not be empty", "render_views(views=['front_right_34'])")+ raise ToolUsageError("views must not be empty", "render_views(views=['front_right_high'])")return outdiff --git a/harness/codeverse/spatial/tools.py b/harness/codeverse/spatial/tools.pyindex f8ee6ed6..ece675a4 100644--- a/harness/codeverse/spatial/tools.py+++ b/harness/codeverse/spatial/tools.py@@ -351,10 +351,10 @@ class RenderSheetArgs(BaseModel):mode: str = Field(default="shaded", description=_MODE_DESC)-@tool("render_sheet", RenderSheetArgs, "One labelled 8-view contact sheet of the built object (all canonical views).", cost_hint="slow")+@tool("render_sheet", RenderSheetArgs, "One labelled 14-view contact sheet of the built object (all canonical views).", cost_hint="slow")def render_sheet(ctx: ToolContext, args: RenderSheetArgs) -> Observation:obs = _render(ctx, "render_sheet", views=[v.name for v in OBJECT_VIEWS], mode=args.mode, isolate=[], explode=0.0, size=512,- note=f"{args.mode} 8-view sheet")+ note=f"{args.mode} 14-view sheet")if obs.ok and obs.images:obs.images = obs.images[:1] # the sheet alone is the deliverable herereturn obsdiff --git a/harness/codeverse/tracks/candidates.py b/harness/codeverse/tracks/candidates.pyindex 1a066530..8bfbc5f7 100644--- a/harness/codeverse/tracks/candidates.py+++ b/harness/codeverse/tracks/candidates.py@@ -9,7 +9,7 @@goes to its own ``events.jsonl``; the run log carries ``candidate.*``. The winner(quick score → fewer gate errors; a pairwise tie-break when the top two arewithin judge noise) is copied back into the run workspace and the ordinary- round-0 pipeline (build → gates → 8-view render → full judge) runs on it.+ round-0 pipeline (build → gates → 14-view render → full judge) runs on it.Every candidate is charged to the run budget and persisted in``rounds/candidates.json``.* ``choose_best_round`` — after each round: when the new score is within