google / google/jaxopt

Hager-Zhang linesearch does not work with non-jittable functions

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

Description

Currently, the Hager-Zhang linesearch uses its own `lax.while_loop` (see [this line](https://github.com/google/jaxopt/blob/main/jaxopt/_src/hager_zhang_linesearch.py#L200)). This means that the objective functions must be jittable.

In order to support non-jittable functions, we should use JAXopt's while_loop instead, so that we can propagate the jit and unroll options to it.

CC @emilyfertig @srvasude

See #444 for context

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.