-
Notifications
You must be signed in to change notification settings - Fork 26
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
Export compiled objectives for common equilibrium resolutions? #1402
Comments
In my last meeting with Egemen, we talked about this after I showed him some profiling. The long initialization and long compile times made him ask this. I think #1374 and general performance improvements on Some concerns tho,
I feel like this is not too easy but anyway. |
JAX persistent cache, if enabled by a user, could partially alleviate this |
For example, I created a import jax
import jax.numpy as jnp
jax.config.update("jax_compilation_cache_dir", "../jax-caches")
jax.config.update("jax_persistent_cache_min_entry_size_bytes", -1)
jax.config.update("jax_persistent_cache_min_compile_time_secs", 0) This sets the folder for storage, and sets the minimum limit for time and size to 0 (basically store every compiled code). |
Maybe we can add a dummy folder in the repo, the inner content is not tracked (add them to the .gitignore), and we can add a README in it. Then, add the above lines of code to the backend.py. Users can remove the content once they change their dependencies etc, or not. Because the cache is not too big, only couple MBs. @dpanici @ddudt @f0uriest |
Is there a way to have the cache only allow a certain amount max? because in theory it could grow without bound right? |
https://jax.readthedocs.io/en/latest/persistent_compilation_cache.html#caching-thresholds this may also be useful |
Make a note of this in docs that you can enable this to speed up repeated compilations |
https://jax.readthedocs.io/en/latest/export/export.html
The text was updated successfully, but these errors were encountered: