google / google/jaxopt

Attempted boolean conversion of traced array - for hager-zhang

Open
#557 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.1k
Forks
76
Avg merge
2d 21h
Merged PRs (30d)
1

Description

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`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.