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

Attempted boolean conversion of traced array - for hager-zhang #557

Open
SNMS95 opened this issue Nov 25, 2023 · 2 comments
Open

Attempted boolean conversion of traced array - for hager-zhang #557

SNMS95 opened this issue Nov 25, 2023 · 2 comments

Comments

@SNMS95
Copy link

SNMS95 commented Nov 25, 2023

I was trying to use jaxopt.LBFGS with linesearch='hager-zhang'.
The following error appeared

Attempted boolean conversion of traced array with shape bool[]..
The error occurred while tracing the function _update_interval at python3.10/site-packages/jaxopt/_src/hager_zhang_linesearch.py:286 for cond. This value became a tracer due to JAX operations on these lines:

  operation a:f64[] = convert_element_type[new_dtype=float64 weak_type=False] b
  • This error occurs when trying to make the update using the .update() methods.
  • This does not show up for zoom or backtracking
@SNMS95
Copy link
Author

SNMS95 commented Nov 30, 2023

Hi @mblondel ,

Do you know why this could happen?

@mblondel
Copy link
Collaborator

Do you have a short script to reproduce?

CC @emilyfertig

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

No branches or pull requests

2 participants