path-planner Phase 2d: conditioning-variant routing
Route the conditioning variant from per-config outcome history, via the one charter-safe surface: the INTERNAL value-function ascend+search (not user knobs, so no WYSIWYG / hidden-settings violation). Sampler-owned visual ops stay on the sampler (boundary law kept). Directly serves the original complaint (Perfect not locking, Awful reproducing): - _v2_path_conditioning_plan: matching-arm Beta posteriors -> liked-rate mean -> "lock" (>=0.6: hold the liked conditioning, skip the stochastic search), "explore" (<=0.4: widen the search to flee a disliked region), else "normal" - value_function.search gains eps_scale to widen/tighten the search radius - threaded conditioning_plan through ascend -> apply_scene_refinement_keys -> finalize; computed once per run from path_outcomes + prompt concepts; logged Only active once the per-key VF is ready, since it rides the existing ascend path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
b6f17f2b3b
commit
9fb0ee267b
+7
-3
@@ -117,14 +117,18 @@ class OnlineValueFunction(nn.Module):
|
||||
prev_reward = reward_val
|
||||
return c.detach().to(orig_device, orig_dtype)
|
||||
|
||||
def search(self, conditioning, n=16):
|
||||
"""Monte Carlo conditioning search: score N random perturbations, return the best."""
|
||||
def search(self, conditioning, n=16, eps_scale=1.0):
|
||||
"""Monte Carlo conditioning search: score N random perturbations, return the best.
|
||||
|
||||
eps_scale widens (>1) or tightens (<1) the perturbation radius. The path planner uses
|
||||
a wider radius to push a disliked config region toward a different conditioning, and the
|
||||
caller skips this search entirely to LOCK a liked region's conditioning in place."""
|
||||
if not self.is_ready():
|
||||
return conditioning
|
||||
mlp_device = next(self.parameters()).device
|
||||
orig_device = conditioning.device
|
||||
orig_dtype = conditioning.dtype
|
||||
eps = conditioning.float().norm().item() * 0.025
|
||||
eps = conditioning.float().norm().item() * 0.025 * float(eps_scale)
|
||||
with torch.inference_mode(False), torch.no_grad():
|
||||
c_base = torch.empty(conditioning.shape, dtype=torch.float32, device=mlp_device)
|
||||
c_base.copy_(conditioning)
|
||||
|
||||
Reference in New Issue
Block a user