FE-1263: Sweep scenario parameters with a navigator that computes the selection - #9093
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
kube
added a commit
that referenced
this pull request
Aug 27, 2026
Ranges, axes, the cartesian grid with its 200-combination cap, and the run ladder port unchanged from PR #9093's parameter-grid module. The lazy-grid pieces stay behind: the rework refines only the selected combination, so cell-levelling and cross-cell marginalization go.
kube
changed the base branch from
main
to
cf/fe-1429-run-trial-replicates-through-the-shared-experiment-backend
August 27, 2026 01:59
kube
force-pushed
the
cf/fe-1263-experiment-parameter-ranges
branch
from
August 27, 2026 01:59
ad7c211 to
bfa165e
Compare
kube
added a commit
that referenced
this pull request
Aug 27, 2026
Ranges, axes, the cartesian grid with its 200-combination cap, and the run ladder port unchanged from PR #9093's parameter-grid module. The lazy-grid pieces stay behind: the rework refines only the selected combination, so cell-levelling and cross-cell marginalization go.
kube
force-pushed
the
cf/fe-1263-experiment-parameter-ranges
branch
from
August 27, 2026 16:40
bfa165e to
bdcb114
Compare
kube
force-pushed
the
cf/fe-1263-experiment-parameter-ranges
branch
from
August 27, 2026 18:24
bdcb114 to
367970a
Compare
The worker body moves to attachMonteCarloWorker(runtime), so Web Workers, Node worker_threads, and an in-process loopback all run the same protocol. Experiments accept explicit per-run configs (sliced per shard), and each run's final metric values come back as runResults — the per-seed objectives optimization replicates need.
Each trial becomes one Monte Carlo experiment: explicit run seeds keep replicate 0 on the base seed, worker_threads carry the shards under Node, and the in-process worker covers source runs and tests. Replicates no longer fail fast — they run in parallel and validate together.
The experiment stops sniffing navigator and defaults to one shard. The editor's provider passes getDefaultMonteCarloShardCount(); the CLI gains --threads, defaulting to one per core minus one, where --threads 1 spawns no workers and simulates on the calling thread.
Ranges, axes, the cartesian grid with its 200-combination cap, and the run ladder port unchanged from PR #9093's parameter-grid module. The lazy-grid pieces stay behind: the rework refines only the selected combination, so cell-levelling and cross-cell marginalization go.
createSweepSession computes one combination in ladder-climbing batches, restarts on the combination the navigator moves to, and folds finished batches into a per-combination cache so revisits resume mid-ladder. Batch seeds derive from the run range, so every combination samples the same seed sequence (common random numbers) and cancelled rungs repeat exactly. Scalar frame merging becomes exact through the run-aggregate monoid the frames now carry.
Scenario parameters gain a Sweep toggle in the create drawer (min, max, value count), capped at 200 combinations. A sweep's first batch runs the same GPU-or-CPU backend selection walk as a plain experiment — the walk now returns the chosen backend, and later batches re-assess it directly. Sweeps report idle, a non-terminal rest state, when their selected combination saturates.
Sections gain a sticky-band slot: content pinned with the title while the section's body scrolls. A sweep's drawer uses it for the navigator — a segmented control per short axis, a stepper per long one, and a refinement line showing the ladder climb — so changing a parameter while watching the charts below is one motion.
The user guide gains a Parameter sweeps section and the Idle status; the architecture docs gain a parameter-sweeps page with the refinement-loop diagram, attached to react.experiments.
kube
force-pushed
the
cf/fe-1263-experiment-parameter-ranges
branch
from
September 2, 2026 19:37
ea797e1 to
e79367f
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e79367f. Configure here.
YannisZa
approved these changes
Sep 3, 2026
Base automatically changed from
cf/fe-1429-run-trial-replicates-through-the-shared-experiment-backend
to
main
September 3, 2026 12:06
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 Parameter sweeps feature flag.
Summary
Before this PR, experiments take one fixed value per scenario parameter. FE-1263 prototype swept parameters with a bespoke lazy-grid scheduler outside the shared experiment runtime.
Experiments can now sweep scenario parameters. A Sweep toggle per numeric parameter defines evenly spaced values. Ranges form a grid capped at 200 combinations, and the results drawer gains a pinned navigator over it. Only the selected combination computes: runs accumulate in escalating batches that stream into the charts. Moving any control cancels the in-flight batch and restarts on the new combination. Visited combinations keep their results. Prototype's scheduler is replaced by batches through the backend registry.
Links
Changes
UI
Sectiongains a sticky-band slot in the results drawerSweep session and grid
react/experiments/sweep-session.tsruns the refinement loopreact/experiments/parameter-grid.tsis ported from the prototypeidlemeans the selected combination is saturatedTest coverage
parameter-grid.test.ts, 21 tests:sweep-session.test.ts, 8 tests:provider.test.tsx, 4 new tests:Parameter sweepstory, verified interactively:How to test