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 solver failing tests #1170

Closed
martinjrobins opened this issue Sep 16, 2020 · 0 comments · Fixed by #1171
Closed

jax solver failing tests #1170

martinjrobins opened this issue Sep 16, 2020 · 0 comments · Fixed by #1171
Assignees

Comments

@martinjrobins
Copy link
Contributor

martinjrobins commented Sep 16, 2020

Describe the bug

Some tests in TestJaxBDFSolver are now failing.

File "/home/runner/work/PyBaMM/PyBaMM/pybamm/solvers/jax_bdf_solver.py", line 169, in _bdf_init
    state['newton_tol'] = jnp.max((10 * EPS / rtol, jnp.min((0.03, rtol ** 0.5))))
  File "/home/runner/work/PyBaMM/PyBaMM/.tox/tests/lib/python3.7/site-packages/jax/numpy/lax_numpy.py", line 1670, in reduction
    _check_arraylike(name, a)
  File "/home/runner/work/PyBaMM/PyBaMM/.tox/tests/lib/python3.7/site-packages/jax/numpy/lax_numpy.py", line 297, in _check_arraylike
    raise TypeError(msg.format(fun_name, type(arg), pos))
jax.traceback_util.FilteredStackTrace: TypeError: min requires ndarray or scalar arguments, got <class 'tuple'> at position 0.

From @tlestang: It looks like jnp.min() is given a tuple when its expecting a array. Is this maybe a change in the latest jax @martinjrobins ?

To Reproduce

Run tests with recent version of jax

Expected behaviour

tests pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant