FE-1536: Contour surface for optimization studies with local recompute - #9398
Draft
kube wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 is the purpose of this PR?
The Optuna-style contour surface existed only in the Experiments drawer. An optimization study is where it matters most: it already declares bounded parameters and an objective, and its trials stream back with parameter and objective values. This adds a Surface section to the optimization detail drawer — the study's trials drawn as markers over a contour computed locally, navigable by sliders and clicks, streaming the objective's mean and median at the selected point.
🔗 Related links
🔍 What does this change?
sampleDetachedObjectiveon the experiments context: local compute against an arbitrary net snapshot on a serialized single-worker lane. Compilation (HIR artifacts + scenario HIR) is cached per study; the objective runs as an expression metric; booleans coerce to the engine's 0/1 encoding. This exists because a study must run its frozeninput.model.definition, not the live editor net — the two drift the moment the user edits after launching.react/optimizations/surface-grid.ts: quantized axes from the study's domains — log-scale domains quantize in log space, integer domains snap to their declared step (7 unit tests).optimization-surface.tsxin the drawer after Steps, gated on two non-boolean optimized parameters: X/Y pickers, one slider per optimized parameter (initialized from the best trial, else the domain midpoint), a coarse-to-fine local sampling walk feeding the contour, per-position caching with ladder seeds (common random numbers, same rule as sweeps), a readout streaming the objective's mean · median · runs for the selected point, the study's completed trials as rings (best highlighted) projected the way Optuna'splot_contourprojects, and click-to-navigate.SlidergainsstepandonChangeEndpass-throughs.optimization.md"The surface view") and the arch-docs sweep-surface page gain the optimization-surface story; patch changesets for both packages.Verified live in the "Run Supply Chain optimization" story: a 100-trial fake study streamed in, the Surface section rendered with sliders at the best trial's values, the trial rings drew across the plane, and real local simulations of the frozen snapshot landed points that filled the contour.
Known follow-up (in the ticket): local batches queue on one serialized lane, so on heavy nets the selected point's readout can wait behind walk cells — it should jump the queue.
Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
@hashintel/petrinaut,@hashintel/ds-components; patch changesets included)📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🤖 Generated with Claude Code