Skip to content

Statespace doesn't work in Numba mode #476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jessegrabowski opened this issue May 15, 2025 · 0 comments · Fixed by pymc-devs/pytensor#1406
Closed

Statespace doesn't work in Numba mode #476

jessegrabowski opened this issue May 15, 2025 · 0 comments · Fixed by pymc-devs/pytensor#1406
Labels
bug Something isn't working enhancements New feature or request help wanted Extra attention is needed statespace

Comments

@jessegrabowski
Copy link
Member

jessegrabowski commented May 15, 2025

Currently, trying to compile (any?) statespace model in mode="NUMBA" fails. It would be really, really nice to fix this.

I think the error is related to advanced indexing here. This code is responsible for masking out any missing values at a given time step (they are treated as hidden states for that update). It shouldn't be hard to write this check in a different way that numba will be happy with. I'm not 100% sure that's the actual problem, but it's where I'd start.

We should make a test_statespace_NUMBA.py file that more-or-less copies the test_statespace_JAX.py file, then do a red-green refactor on the code. Actually, we should probably start with a test_kalman_filter_NUMBA file, since that will help break the problem down into smaller pieces and identify the bug. Testing the filters alone (without any of the complexity overhead of the models) would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancements New feature or request help wanted Extra attention is needed statespace
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant