Add split preview visualization to model session configuration - #877
Open
Irozuku wants to merge 3 commits into
Open
Add split preview visualization to model session configuration#877Irozuku wants to merge 3 commits into
Irozuku wants to merge 3 commits into
Conversation
GEOMETRY names the split shape so the sidebar can preview it instead of guessing from the schema parameters.
Holdout and cross validation explain themselves in every supported language instead of the frontend hardcoding the text.
Draws the partitions or folds the selected splitter produces and redraws as its parameters change.
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.
Summary
The session sidebar now draws the splits a configuration will produce, under the evaluation strategy selector. The figure reacts to the selected strategy, the selected splitter and its parameters, with a colored band per partition or fold.
Which figure to draw is read from the splitter, not guessed from its schema parameters. Every splitter declares a
geometry, and every splitter and evaluation strategy carries aMultilingualStringdescription that the sidebar prints next to the figure. A splitter whose shape has no renderer draws nothing rather than drawing a confident picture of a split that never happens.Video_260911104205.mp4
Type of Change
Check all that apply like this [x]:
Changes (by file)
Backend, split shape:
DashAI/back/splitters/base_splitter.py: addsGEOMETRY, defaulting to"unknown", and reports it fromget_metadata.DashAI/back/splitters/holdout.py:PartitionSplitterdeclares"partitions", inherited byHoldoutSplitter.DashAI/back/splitters/fold_splitter.py: declares"blocked_folds", inherited by every k-fold family splitter.DashAI/back/splitters/temporal_holdout.py: declares"sequential_partitions".DashAI/back/splitters/rolling_origin.py: declares"expanding_window".Backend, prose:
DashAI/back/splitters/*.py: every registered splitter gains aDESCRIPTIONin the five supported languages, saying what the split does and when to reach for it.DashAI/back/evaluation/holdout.py,cv.py,forecasting_holdout.py,forecasting_cv.py: same for the four evaluation strategies. The components API already runs responses throughlocalize, so no new plumbing was needed.Frontend:
DashAI/front/src/utils/splitPreview.js: new. Pure geometry, no React. Turns a geometry plus the live parameters into rows of colored segments. Four renderers: single bar partitions, sequential partitions, blocked folds with a sliding validation block, and an expanding window whose train prefix grows bystepand is scored on the nexthorizonrows.DashAI/front/src/components/models/modelSession/SplitPreview.jsx: new. Renders the rows, a legend with percentages, the strategy and splitter descriptions, and the reserved test band.DashAI/front/src/components/models/modelSession/SplitsCard.jsx: new. The card shell extracted out ofSplitDatasetRowsso both files can use it.DashAI/front/src/components/models/modelSession/SplitDatasetRows.jsx: renders the preview after the splitter selector, and resolvesselectedStrategyonce instead of callingfindStrategythree times.DashAI/front/src/utils/i18n/locales/*/experiments.json: asplitPreviewgroup with the labels the figure draws. The explanatory prose is not here; it comes from the components API.Tests:
tests/back/splitters/test_splitter_geometry.py: new. Pins that every registered splitter reports a shape the frontend has a renderer for, that the series splitters are never drawn as shuffled ones, and thatgeometrysits alongside what the metadata already carried.Testing
n_splits,test_size,horizonandstep. The figure should redraw on every keystroke. A rolling origin configuration that does not fit reports the same condition the backend raises on instead of drawing folds.