Skip to content

Gray out Train Aligners until a dataset has manual alignments - #166

Open
BeckettFrey wants to merge 1 commit into
mainfrom
feature/train-aligners-gating
Open

Gray out Train Aligners until a dataset has manual alignments#166
BeckettFrey wants to merge 1 commit into
mainfrom
feature/train-aligners-gating

Conversation

@BeckettFrey

@BeckettFrey BeckettFrey commented Aug 19, 2026

Copy link
Copy Markdown
Member

Split out of #163 so it can be reviewed on its own.

What

Disables the Train Aligners pipeline step — both the sidebar entry and the page behind it — whenever no registered dataset has a manual/hand alignment. It re-evaluates on reload(), so registering a qualifying dataset enables the step without restarting the app.

Why

Training only produces a meaningful model when it can learn from a hand-corrected alignment. Training against machine-generated alignments alone just reinforces whatever errors those alignments already contain.

Concerns with this approach

  1. The page can't be opened at all, even to look at it. Disabling the stacker as well as the sidebar entry means a user cannot explore what Train Aligners is before they have the data to run it. Exploration is exactly what a first-time user wants from the pipeline sidebar.

  2. It gives this one step behavior no other step has. Every other sidebar entry is always reachable. Train Aligners becomes the sole step whose availability depends on external state, which is a special case in PipelineFormStack (_menu_items, _refresh_training_availability) to maintain and reason about from here on.

  3. It never says inline how to enable it. A grayed-out row with no reachable page gives the user no in-place path forward. The explanation lives in the Pipeline Overview under stage Ⓑ and on the Train Aligners page — but the page is precisely what they cannot open, so one of the two places explaining the requirement sits behind the gate it explains.

Counter-proposal: filter the alignment dropdown instead

Leave Train Aligners always reachable, and make TrainingStacker's alignment dropdown list only hand/corrected alignments, excluding machine-generated ones.

The machinery already exists. on_dataset_changed (training_stacker.py:84) populates the dropdown from alignments.list_alignments(...) and already calls alignments.get_alignment_type(a) for display — which returns "hand", "corrected", or "automatic". The filter is that predicate applied one line earlier. The empty state exists too: when a dataset has no usable alignments the dropdown disables itself behind a placeholder (training_stacker.py:109-114), so "No hand-corrected alignments for this dataset" lands where the user is already looking, at the moment they pick the dataset.

Same guarantee — you cannot train on generated-only data — while:

  • keeping the page browsable for exploration,
  • keeping every sidebar step uniformly reachable, with no per-step availability logic,
  • putting the message inline at the point of failure instead of a page away.

It is also the smaller change: no QListWidgetItem tracking, no item:disabled styling, no any_dataset_has_manual_alignments(). And it removes a second source of truth — the gate keys on the dataset's hand_alignments_path, while the dropdown keys on each alignment's alignment_type.

Changes (as currently implemented)

  • storage/datasets.pyany_dataset_has_manual_alignments() helper.
  • gui/pages/pipeline/__init__.py — track menu items by step id; _refresh_training_availability() on init and on reload.
  • gui/__init__.pyQListWidget::item:disabled styling so the grayed-out step reads as disabled.
  • gui/pages/pipeline/training_stacker.py — explanatory note on the page.
  • config/profiles/explanatory/pipeline_definitions.yaml — Pipeline Overview copy for stage Ⓑ.

Testing

Manual: with no hand-aligned dataset registered the step is grayed and unclickable; after registering one and reloading, it becomes available.

Related

Training only produces a meaningful model when it can learn from a
hand-corrected alignment; training against machine-generated alignments
alone just reinforces their own errors. Disable the sidebar step and its
page whenever no registered dataset has a manual/hand alignment, and
re-evaluate on reload so registering one enables it without a restart.

Why it's unavailable is explained in the Pipeline Overview under stage B
rather than a sidebar tooltip: the sidebar is too narrow for an inline
explanation, and Qt does not reliably show tooltips on disabled
QListWidgetItems. The Train Aligners page itself also carries the same
note for anyone who reaches it once enabled.
BeckettFrey added a commit that referenced this pull request Aug 19, 2026
Moved to its own branch and PR (#166) so it can be reviewed on its own
merits, since gating a whole pipeline step is a bigger call than the
rest of this branch's polish. No behavior change intended here beyond
reverting to the pre-gating state: the Train Aligners step is available
again, and the Pipeline Overview goes back to its original stage B copy.

Reverts the gating hunks only. The W2TG speaker-adaptation default, the
word/phone tier order, and the app branding work all stay.
@BeckettFrey
BeckettFrey requested a review from nrgslp August 20, 2026 20:18
@BeckettFrey

Copy link
Copy Markdown
Member Author

@nrgslp see the concerns section and counter-proposal above. This starts to touch on architectural decisions which conflict with my thinking. Happy to hop on a call, or discuss Monday. Thanks again for these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant