Skip to content

Official Codebase of 3DCodeVerse

Python

judges/spatial: montage knobs live once; the last legacy view defaults follow the rig

gaoypengc91c8e5e5384
diff --git a/harness/codeverse/judges/prompt_builder.py b/harness/codeverse/judges/prompt_builder.py
index 61ae022f..6f36a001 100644
--- a/harness/codeverse/judges/prompt_builder.py
+++ b/harness/codeverse/judges/prompt_builder.py
@@ -165,6 +165,10 @@ _POSITIONS = {
4: ("top-left", "top-right", "bottom-left", "bottom-right"),
}
MAX_TILES = 4
+#: payload knobs (defaults; ``Settings.judge`` overrides per run). 5 montages carry the
+#: 14-view rig + the clay geometry montage; 3 silently dropped the low ring + poles (D47).
+MAX_MONTAGES = 5
+MAX_DETAIL_CROPS = 2
@dataclass(frozen=True)
@@ -222,8 +226,8 @@ def plan_montages(
*,
geometry_views: RenderSet | None = None,
scene: bool = False,
- max_montages: int = 3,
- detail_crops: int = 2,
+ max_montages: int = MAX_MONTAGES,
+ detail_crops: int = MAX_DETAIL_CROPS,
) -> list[Montage]:
"""Decide which montages a judge call gets (see module docstring for the priority)."""
shaded = [v for v in renders.views if not (is_pose_view(v) or is_pose_sheet(v) or is_geometry_view(v))]
@@ -389,8 +393,6 @@ if TYPE_CHECKING: # pragma: no cover
from codeverse.judges.base import JudgeInput
TEXT_BUDGET_CHARS = 24_000 # ≈ 6k tokens
-MAX_MONTAGES = 5 # 14-view rig: 4 shaded 2×2s + the clay geometry montage (D47)
-MAX_DETAIL_CROPS = 2
MAX_PX = 1024 # montages are 2×2 grids: keep them legible
MONTAGE_TILE_PX = 512
diff --git a/harness/codeverse/spatial/tools.py b/harness/codeverse/spatial/tools.py
index ece675a4..4aca02bf 100644
--- a/harness/codeverse/spatial/tools.py
+++ b/harness/codeverse/spatial/tools.py
@@ -710,7 +710,7 @@ def texture_pass_tool(ctx: ToolContext, args: TexturePassArgs) -> Observation:
class TexturePreviewArgs(BaseModel):
- views: list[str] = Field(default=["front_right_34", "back_left_34", "front", "top"], description="view names")
+ views: list[str] = Field(default=list(_DEFAULT_VIEWS), description="view names")
@tool("texture_preview", TexturePreviewArgs,
@@ -747,7 +747,7 @@ _SYNTH_WARNING = ("This reference was SYNTHESIZED from the brief by an image mod
class CompareReferenceArgs(BaseModel):
- view: str = Field(default="front_right_34", description="view to render for the comparison")
+ view: str = Field(default="front_right_high", description="view to render for the comparison")
reference_index: int = Field(default=0, ge=0, description="index into spec.references")
size: int = Field(default=512, ge=256, le=1024, description="render size in px (square)")
@@ -762,7 +762,7 @@ def compare_reference(ctx: ToolContext, args: CompareReferenceArgs) -> Observati
return Observation.error(f"reference image {ref_path.name} not found")
if args.view not in VIEW_BY_NAME:
raise ToolUsageError(f"unknown view {args.view!r}; choose from {list(VIEW_BY_NAME)}",
- "compare_reference(view='front_right_34')")
+ "compare_reference(view='front_right_high')")
preset = VIEW_BY_NAME[args.view]
shaded = cached_render_glb(ctx, glb, views=[preset], mode="shaded", size=args.size, sheet=False)
sil = cached_render_glb(ctx, glb, views=[preset], mode="silhouette", size=args.size, sheet=False)
diff --git a/harness/codeverse/tracks/static_object.py b/harness/codeverse/tracks/static_object.py
index df114842..79fbdfc4 100644
--- a/harness/codeverse/tracks/static_object.py
+++ b/harness/codeverse/tracks/static_object.py
@@ -568,7 +568,8 @@ def detail_instructions(last: Any, *, max_lines: int = 8) -> list[str]:
# ===================================================================== reference images
SILHOUETTE_GATE = "reference_silhouette"
IOU_REFINE_THRESHOLD = 0.6
-FRONT_VIEW_NAMES: tuple[str, ...] = ("front", "front_right_34", "front_left_34")
+FRONT_VIEW_NAMES: tuple[str, ...] = ("front", "front_right_high", "front_left_high",
+ "front_right_34", "front_left_34") # *_34 = pre-D47 stored runs
def target_reference(ctx: RunContext) -> str | None: