fix: support statsmodels 0.15 in naive forecasters - #1587
Merged
Li Jiang (thinkall) merged 2 commits intoSep 7, 2026
Merged
Conversation
Pass the estimated initialization method explicitly because Statsmodels 0.15's SimpleExpSmoothing wrapper defaults to None while its base class now requires a string. Add a regression test to keep the constructor argument explicit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Sep 2, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused compatibility fix is correct and adequately covered by a regression test.
Pull request overview
Adds Statsmodels 0.15 compatibility for FLAML’s naive forecasters.
Changes:
- Explicitly uses estimated initialization for
SimpleExpSmoothing. - Adds regression coverage verifying the initialization method.
File summaries
| File | Description |
|---|---|
flaml/automl/time_series/ts_model.py |
Configures explicit smoothing initialization. |
test/automl/test_forecast.py |
Tests the supplied initialization method. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
jianglibigdata
approved these changes
Sep 7, 2026
Li Jiang (thinkall)
deleted the
fix/statsmodels-015-simple-exp-smoothing
branch
September 7, 2026 07:19
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.
Why are these changes needed?
Statsmodels 0.15.0 was released on August 27 and changed
SimpleExpSmoothingso its wrapper still suppliesinitialization_method=Nonewhile the baseExponentialSmoothingconstructor now requires a string. FLAML'snaiveandsnaiveestimators consequently fail withTypeError: initialization_method must be a string.This failure reproduces on scheduled builds of
mainand is also the cause of the failing build matrix in #1568 (and newer unrelated PRs), so it is not introduced by those PR changes.What does this PR do?
initialization_method="estimated"explicitly when constructingSimpleExpSmoothing, preserving the documented pre-0.15 default behavior.Verification
pytest test/automl/test_forecast.py::test_simple_forecaster_sets_initialization_method -qpre-commit run --files flaml/automl/time_series/ts_model.py test/automl/test_forecast.py