Repository navigation
Improve jit documentation - #68
Merged
Merged
Conversation
Owner
Author
|
@Jan-Williams looks good to me! |
Jan-Williams
added a commit
that referenced
this pull request
May 21, 2026
Written in response to Issue #60. Improves documentation of static fields in ORC models and improves documentation/advertisement of the use of `eqx.filter_{jit,vmap,grad}` vs JAX native counterparts.
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.
Opening in response to esn_forecast not jittable.
Two representative issues were raised there:
(1). Code like
can't be wrapped with
jax.jit(2). Code like
can't be wrapped with
jax.jit(1) has been fixed by explicitly registering string-based attributes as static in ORC layers.
esn, R = jax.jit(orc.forecaster.train_RCForecaster)(esn, U_train)(and similar) now run without issue.(2) is a bit more difficult. JAX sparse BCOO matrices are not hashable, so to my knowledge there is no way to make the above pattern work with
jax.jit.eqx.filter_jit, on the other hand, works as a drop in replacement. This is one of the main arguments for the use ofeqx.filter_jitoverjax.jitand the README.md and docs have been updated to clearly state this preference.jax.jitcan still work, but needs something like the following:An additional example notebook has been added to illustrate the use of these different patterns and state the preference for
eqx.filter_jit.@ymahlau Does this address your concerns from esn_forecast not jittable?