Skip to content

Add split preview visualization to model session configuration - #877

Open
Irozuku wants to merge 3 commits into
developfrom
feat/split-preview
Open

Add split preview visualization to model session configuration#877
Irozuku wants to merge 3 commits into
developfrom
feat/split-preview

Conversation

@Irozuku

@Irozuku Irozuku commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

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 a MultilingualString description 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]:

  • Backend change
  • Frontend change
  • CI / Workflow change
  • Build / Packaging change
  • Bug fix
  • Documentation

Changes (by file)

Backend, split shape:

  • DashAI/back/splitters/base_splitter.py: adds GEOMETRY, defaulting to "unknown", and reports it from get_metadata.
  • DashAI/back/splitters/holdout.py: PartitionSplitter declares "partitions", inherited by HoldoutSplitter.
  • 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 a DESCRIPTION in 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 through localize, 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 by step and is scored on the next horizon rows.
  • 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 of SplitDatasetRows so both files can use it.
  • DashAI/front/src/components/models/modelSession/SplitDatasetRows.jsx: renders the preview after the splitter selector, and resolves selectedStrategy once instead of calling findStrategy three times.
  • DashAI/front/src/utils/i18n/locales/*/experiments.json: a splitPreview group 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 that geometry sits alongside what the metadata already carried.

Testing

  • Open a session, switch between Holdout and Cross Validation, change the splitter and edit n_splits, test_size, horizon and step. 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.

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.
@Irozuku Irozuku added enhancement New feature or request front Frontend work back Backend work labels Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

back Backend work enhancement New feature or request front Frontend work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant