Skip to content

feat: add centralized input validation for forecasters - #10

Merged
AzulGarza merged 1 commit into
mainfrom
feature/input-validation
Sep 7, 2026
Merged

feat: add centralized input validation for forecasters#10
AzulGarza merged 1 commit into
mainfrom
feature/input-validation

Conversation

@elmartinj

Copy link
Copy Markdown
Collaborator

Closes #7.\n\nAdds Forecaster.validate_input to check required columns, non-empty DataFrames, and positive horizons before any model is loaded or API called. Validation is applied in Forecaster.cross_validation and MultiModelForecasterMixin._call_models, so both single-model and multi-model entry points fail early with consistent error messages.\n\nAlso rejects FoundationForecast(models=[]) during construction instead of waiting for a forecasting method.

@elmartinj

Copy link
Copy Markdown
Collaborator Author

This PR also addresses the empty-model-list suggestion: FoundationForecast(models=[]) is now rejected during initialization. If you would rather keep that as a separate change, I can split it out.

Adds Forecaster.validate_input to catch missing columns, empty

DataFrames, and non-positive horizons before model inference.

Also rejects FoundationForecast(models=[]) at construction time.

Closes #7.
@elmartinj
elmartinj force-pushed the feature/input-validation branch from 2c46cbd to f9f35d6 Compare September 7, 2026 18:37

@AzulGarza AzulGarza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm:)

@AzulGarza
AzulGarza merged commit 401ce37 into main Sep 7, 2026
8 checks passed
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.

Add centralized validation for forecaster inputs

2 participants