Skip to content

[ENH] Add SARIMA forecaster#3622

Draft
TonyBagnall wants to merge 4 commits into
mainfrom
ajb/sarima
Draft

[ENH] Add SARIMA forecaster#3622
TonyBagnall wants to merge 4 commits into
mainfrom
ajb/sarima

Conversation

@TonyBagnall

@TonyBagnall TonyBagnall commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

credited to @GiGiKoneti, done this way so I can benchmark and test it. Still wip

@TonyBagnall
TonyBagnall marked this pull request as draft July 8, 2026 19:15
@aeon-actions-bot aeon-actions-bot Bot added enhancement New feature, improvement request or other non-bug code enhancement forecasting Forecasting package labels Jul 8, 2026
@aeon-actions-bot

Copy link
Copy Markdown
Contributor

Thank you for contributing to aeon

I have added the following labels to this PR based on the title: [ enhancement ].
I have added the following labels to this PR based on the changes made: [ forecasting ]. Feel free to change these if they do not properly represent the PR.

The Checks tab will show the status of our automated tests. You can click on individual test runs in the tab or "Details" in the panel below to see more information if there is a failure.

If our pre-commit code quality check fails, please run pre-commit locally and push the fixes to your PR branch.

Don't hesitate to ask questions on the aeon Discord channel if you have any.

PR CI actions

These checkboxes will add labels to enable or disable CI functionality for this PR. This may not take effect immediately, and a new commit may be required to run the new configuration.

  • Run pre-commit checks for all files
  • Run mypy typecheck tests
  • Run all pytest tests and configurations
  • Run all notebook example tests
  • Run numba-disabled codecov tests
  • Disable numba cache loading
  • Regenerate expected results for testing
  • Push an empty commit to re-run CI checks

@TonyBagnall TonyBagnall changed the title [ENH] Add SARIMA to aeon [ENH] Add SARIMA forecaster Jul 8, 2026
value = _arima_fit(params, data, model)
elif fn_id == 1:
value = _ets_fit(params, data, model)[0]
elif fn_id == 2:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Adding fn_id == 2 here conflicts with the existing unit test test_dispatch_loss_unknown_id_raises in aeon/forecasting/utils/tests/test_utils.py, which still expects 2 to be an unknown ID.

Since 2 is now mapped here, calling dispatch_loss(2, ...) in that test attempts to run _sarima_fit with an incompatible mock model array, causing an out-of-bounds access in Numba that segfaults the test runner on macOS and Linux.

We should update test_dispatch_loss_unknown_id_raises in aeon/forecasting/utils/tests/test_utils.py to use 3 instead:

def test_dispatch_loss_unknown_id_raises():
    """An unknown loss function id raises a ValueError."""
    with pytest.raises(ValueError):
        dispatch_loss(
            3,
            np.array([0.5]),
            np.arange(10.0),
            np.array([1, 0, 0, 1], dtype=np.int32),
        )

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes seems correct, want to correct it?

@GiGiKoneti

Copy link
Copy Markdown
Contributor

Hi @TonyBagnall, I've opened #3629 targeting your branch with the test fix.

@TonyBagnall

Copy link
Copy Markdown
Contributor Author

unrelated fail, rerunning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, improvement request or other non-bug code enhancement forecasting Forecasting package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants