google / google/jaxopt

Number of gradient evaluations not applicable to scipy's gradient-free optimizers

Open
#531 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

Since commit [#28a474e](https://github.com/google/jaxopt/commit/28a474e307665971ce3e535d1984325e0ec5b1e4), scipy optimizers that do not use gradients do not work from `jaxopt.ScipyMinimize` anymore.

Because `res.njev` is accessed on the result regardless of the `method` argument, you get an

```
AttributeError: njev. Did you mean: 'nfev'?
```

if you run `jaxopt.ScipyMinimize` e.g. with Nelder-Mead or Powell.

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.