Skip to content

Conversation

@dionhaefner
Copy link
Contributor

The JAX docs state this:

In the context of JAX transformations, Python exceptions should be considered side-effects: this means that intentionally raising an error within a pure_callback breaks the API contract, and the behavior of the resulting program is undefined.

Our callbacks can raise, so switching has_side_effect to True seems like the safer option. I don't know if this has any runtime impact right now (didn't notice any while testing).

@dionhaefner dionhaefner merged commit 7a6db32 into main Jun 17, 2025
10 checks passed
@dionhaefner dionhaefner deleted the dion/effectful-calls branch June 17, 2025 14:34
@pasteurlabs pasteurlabs locked and limited conversation to collaborators Jun 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants