FE-1583: Run the connected optimizer's trials through the experiments backend - #9516
Draft
kube wants to merge 7 commits into
Draft
FE-1583: Run the connected optimizer's trials through the experiments backend#9516kube wants to merge 7 commits into
kube wants to merge 7 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
kube
force-pushed
the
claude/web-optimizer-react-channel
branch
from
September 3, 2026 00:33
06f4f63 to
9dfc3eb
Compare
kube
force-pushed
the
claude/web-optimizer-react-channel
branch
2 times, most recently
from
September 3, 2026 05:40
fe9bfc0 to
2f1fd14
Compare
kube
force-pushed
the
claude/web-optimizer-react-channel
branch
from
September 3, 2026 22:00
2f1fd14 to
dc659ba
Compare
kube
force-pushed
the
claude/web-optimizer-react-channel
branch
from
September 3, 2026 22:23
dc659ba to
fc5cf7b
Compare
kube
force-pushed
the
claude/web-optimizer-react-channel
branch
from
September 4, 2026 11:23
77cbd5e to
7cbe297
Compare
kube
force-pushed
the
claude/web-optimizer-react-channel
branch
from
September 4, 2026 12:02
7cbe297 to
d47c237
Compare
| * reproducible through the field while making studies differ by default. | ||
| */ | ||
| export const randomOptimizationSeed = (): number => | ||
| Math.floor(Math.random() * (PETRINAUT_OPTIMIZATION_MAX_SEED + 1)); |
kube
force-pushed
the
claude/web-optimizer-react-channel
branch
from
September 4, 2026 12:16
215e5a6 to
09c010c
Compare
…behind an experimental setting
…hart stay in view
kube
force-pushed
the
claude/web-optimizer-react-channel
branch
from
September 4, 2026 12:27
09c010c to
77cc6dc
Compare
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.
Important
Experimental
Behind the In-browser optimization feature flag.
Summary
Before this PR,
PetrinautOptimizationContextaccepted a self-contained remote capability, and a study's trials were numbers in a table. Study drawer's Surface could sample the objective locally, but it knew nothing of where the optimizer was looking, and the optimizer could not use the browser's compute at all.This PR lets the context carry a connected optimization source and runs its trials through the experiments layer. A new
runDetachedObjectiveaction runs a frozen study's objective at one parameter point on the chosen backend with pinned seeds and streams its frames. Optimizations provider evaluates each trial through it, follows the trial in the navigator, streams its metrics live, and after the study settles refines the best point, or whichever point the user picks. Study drawer shows the optimizer's own steps as dots on the Surface with the field filling in as steps report, a Stop that keeps the study and a Continue that adds steps to it, up to four steps in flight with an activity list, and one metric line always in view. Form gains Runs per step, Parallel steps and the experiments' Backend switch. A remote capability such as the HASH host's NodeAPI bridge is unaffected, and the connected source only takes effect with the experimental setting on.9516.mp4
Links
Changes
Feature flag
useOptimizationSourceis the one place that reads the context and the settingExperiments layer
runDetachedObjectiveruns a study's objective at one point and streams itqueueKeywhile sharing one compiled snapshot percacheKeyexperiments/sharedfor reuseOptimization channel and provider
computeBackend, its fallback reason, the study'saxes,parallelism,resumable, anavigation, aselectionstream,inFlightsteps and anactivitylistextendOptimization(id, steps)continues a finished or stopped connected studyForm and drawer
SimulateView/shared:useGpuAvailability,ComputeBackendToggle,ComputeBackendBadge,MetricTiles,ComputeActivity,SummaryStripSliderin@hashintel/ds-componentsacceptsdisabledStories and example
Simulate / Browser optimizer (real)runs the real Pyodide optimizer against the real experiments backendsKnown issues
Test coverage
provider/detached-objective.test.ts:optimizations/provider.test.tsx,provider/connected-study.test.ts,provider/point-refinement.test.ts,provider/point-refinement/objective-estimate.test.ts,provider/activity-registry.test.ts,channel/create-optimization-channel.test.ts:create-optimization-drawer.test.tsx,view-optimization-drawer.test.tsx,study-summary-strip.test.ts,steps-table.test.ts,optimization-navigator.test.tsx,optimization-surface/surface-plot.test.tsx,simulate-view.test.tsx,viewport-settings-dialog.test.tsx:examples/vaccination-campaign.test.ts,webgpu/compilation-report.test.ts:How to test
yarn workspace @hashintel/petrinaut dev