Skip to content
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

JAX v0.3.18 contains breaking change that fails CI #2033

Closed
matthewfeickert opened this issue Sep 26, 2022 · 0 comments · Fixed by #2034
Closed

JAX v0.3.18 contains breaking change that fails CI #2033

matthewfeickert opened this issue Sep 26, 2022 · 0 comments · Fixed by #2034
Assignees
Labels
bug Something isn't working

Comments

@matthewfeickert
Copy link
Member

https://github.com/google/jax/releases/tag/jax-v0.3.18 has a breaking change of

jax._src is no longer imported into the from the public jax namespace. This may break users that were using JAX internals.

This breaks the current CI with

=================================== FAILURES ===================================
________________________ test_diffable_backend_failure _________________________

    def test_diffable_backend_failure():
        pyhf.set_backend("numpy", default=True)
        pyhf.set_backend("jax")
    
        def example_op(x):
            y = pyhf.default_backend.astensor(x)
            return 2 * y
    
        with pytest.raises(
            (
                ValueError,
>               jax._src.errors.TracerArrayConversionError,
                jax.errors.ConcretizationTypeError,
            )
        ):
E       AttributeError: module 'jax' has no attribute '_src'

example_op = <function test_diffable_backend_failure.<locals>.example_op at 0x7f352304d2d0>

tests/test_backends.py:65: AttributeError

as

with pytest.raises(
(
ValueError,
jax._src.errors.TracerArrayConversionError,
jax.errors.ConcretizationTypeError,
)
):
jax.jacrev(example_op)([1.0])
def example_op2(x):
y = pyhf.default_backend.power(x, 2)
z = pyhf.tensorlib.sum(y)
return z
with pytest.raises(jax._src.errors.TracerArrayConversionError):
jax.jacrev(example_op2)(pyhf.tensorlib.astensor([2.0, 3.0]))

@matthewfeickert matthewfeickert added bug Something isn't working needs-triage Needs a maintainer to categorize and assign labels Sep 26, 2022
@matthewfeickert matthewfeickert self-assigned this Sep 26, 2022
@matthewfeickert matthewfeickert removed the needs-triage Needs a maintainer to categorize and assign label Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant