Repository navigation
docs: demonstrate dataset target switching and selection - #1596
Merged
bruAristimunha merged 3 commits intoNov 18, 2026
Merged
bruAristimunha merged 3 commits into
bruAristimunha merged 3 commits into
Conversation
…aset-targets-897-2026-11-18 # Conflicts: # docs/whats_new.rst
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1596 +/- ##
=======================================
Coverage 92.19% 92.19%
=======================================
Files 185 185
Lines 24299 24299
=======================================
Hits 22403 22403
Misses 1896 1896 🚀 New features to boost your workflow:
|
bruAristimunha
marked this pull request as ready for review
November 18, 2026 22:10
# Conflicts: # docs/whats_new.rst
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
Related to #897. Extend the existing TUH multi-target tutorial to show how to change prediction targets and select a recording subset, without changing the dataset API or adding another tutorial.
Changes
set_targetto switch from multiple targets to a numeric class label and then age regression, including clearing the earlier array transform.description, window-levelget_metadata(), target lookup priority and why editing the merged metadata report alone does not change returned targets.descriptionandsplit, and explain shared underlying datasets. Use the existing four-recording mock corpus so this genuinely selects 4 of 16 windows.Testing
examples/datasets_io/plot_tuh_discrete_multitarget.pyon the existing mock corpus: class target 0, regression target 37.0, subset 4/16 windows.python -m pytest test/unit_tests/datasets/test_xy.py test/unit_tests/datasets/test_tuh.py test/unit_tests/datasets/test_dataset.py::test_set_target_syncs_windows_metadata test/unit_tests/datasets/test_dataset.py::test_set_target_rejects_targets_from_channels -q: 23 passed, 5 existing warnings.ruff format --check examples/datasets_io/plot_tuh_discrete_multitarget.pyand the project's Ruff lint rules passed.-W --keep-going: the changed example executed, zero warnings. This is not a full project documentation build.No model training, actual TUH corpus, network dataset downloads or GPU/MPS checks were run. The full test suite includes training and was not run for this documentation-only change.
pre-commit run --files <changed files>: Ruff checks recorded above; the complete pre-commit suite was not claimed.docs/whats_new.rstupdated (required by the changelog CI check)Notes for reviewers
The example still uses the pre-existing private
_TUHMock; no new mock or helper is introduced. The selected corpus version is explicit so the filtering demonstration has both retained and excluded recordings. For real TUH data, the corpus version and path must match the actual data.Model/checkpoint, shared model components, train/eval and API compatibility checks are N/A: none of those components change. A subset shares the underlying recording datasets; it is not an independent deep copy.
OpenAI Codex helped prepare and check this patch. A separate agent reviewed the complete diff and the target/subset semantics. This is not human review or maintainer approval. This PR is a draft for my review.