Skip to content

Raise clear error when gridsearch() receives multiple TimeSeries - #3191

Open
COMPUMAX-EC wants to merge 2 commits into
unit8co:masterfrom
COMPUMAX-EC:fix/gridsearch-multiple-series-error-message
Open

Raise clear error when gridsearch() receives multiple TimeSeries#3191
COMPUMAX-EC wants to merge 2 commits into
unit8co:masterfrom
COMPUMAX-EC:fix/gridsearch-multiple-series-error-message

Conversation

@COMPUMAX-EC

Copy link
Copy Markdown

Fixes #1622

gridsearch() only supports a single TimeSeries for series, val_series, past_covariates, and future_covariates. Passing a sequence of TimeSeries previously failed deep in the call stack with a cryptic error (e.g. "The two TimeSeries sequences must have the same length"), instead of a clear message at the point of the mistake.

This adds an early validation check using the existing get_series_seq_type helper, raising a ValueError that names the offending argument, plus a parametrized test covering all four arguments.

`gridsearch()` only supports a single TimeSeries for `series`,
`val_series`, `past_covariates`, and `future_covariates`. Passing a
sequence of TimeSeries previously failed deep in the call stack with
a cryptic error (e.g. "The two TimeSeries sequences must have the
same length"), making the actual problem hard to diagnose.

Fixes unit8co#1622
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.

Gridsearch doesn't work with multiple timeseries

1 participant