Skip to content

fix(dataset): support TestData and rolling windows in MultivariateGrouper - #3366

Open
Hrushikesh-ramilla wants to merge 1 commit into
awslabs:devfrom
Hrushikesh-ramilla:fix-multivariate-grouper-test-data
Open

Hrushikesh-ramilla wants to merge 1 commit into
awslabs:devfrom
Hrushikesh-ramilla:fix-multivariate-grouper-test-data

Conversation

@Hrushikesh-ramilla

@Hrushikesh-ramilla Hrushikesh-ramilla commented Nov 6, 2026 •

Copy link
Copy Markdown

Issue #, if available:

Fixes #3220

Description of changes:

When MultivariateGrouper was called on datasets yielding (input, label) pairs (such as TestData instances created by splitter.generate_instances(...)), it failed with TypeError: tuple indices must be integers or slices, not str. Additionally, rolling test windows generated in series-major order could fail during
p.vstack due to target length mismatches between consecutive windows of the same series.

This change:

  1. Adds support for TestData, InputDataset, and LabelDataset in MultivariateGrouper, returning properly grouped instances while preserving the splitter and its parameters.
  2. Handles general tuple pairs (input, label).
  3. Updates _prepare_test_data to properly group series across rolling test dates regardless of whether the dataset is ordered series-major or date-major.
  4. Corrects the dynamic real feature slice in _prepare_test_data to match the entries at each test date.
  5. Adds unit tests covering TestData, .input/.label access, and series-major rolling window grouping.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…uper

Fixes awslabs#3220

Signed-off-by: Hrushikesh Ramilla <ramillahrushikesh@gmail.com>
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.

PandasDataset.from_long_dataframe does not work with MultivariateGrouper

1 participant