-
Notifications
You must be signed in to change notification settings - Fork 273
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
support caching all jitted functions #651
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome @jmoralez! LGTM😍
Hi, really great addition! Thank you for working on this. I tried setting the environment variable 'NIXTLA_NUMBA_CACHE=1' or 'NIXTLA_NUMBA_CACHE=0' and they both tend to enable caching! To not cache I have to comment out the 'NIXTLA_NUMBA_CACHE' altogether. Any thoughts ? |
The caching is enabled if the environment variable is set, so if you don't want to enable it you shouldn't set it or delete it if you've already set it elsewhere, e.g. |
Thanks! makes sense :) |
Adds the cache and nogil arguments to all jitted functions. These can be set with:
Also adds a small notebook (nbs/docs/how-to-guides/numba_cache.ipynb) explaining the caching.
NOTE:
The nelder_mead function couldn't be cached because it received another function as input and I couldn't figure out a way to cache it like that, so it's currently repeated for ces, ets and theta (the only difference is the objective function, which is baked into the function).