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

Add a verbose option to BFGS. #95

Merged
merged 2 commits into from
Dec 21, 2024

Conversation

johannahaffner
Copy link
Contributor

@johannahaffner johannahaffner commented Dec 7, 2024

Adds a verbose option to BFGS, with supports printing out the values of loss, y, and step_size at every step.
The tested custom solvers are updated, and the documentation is updated as well.

Users that have written custom solvers that subclass BFGS will now see ValueError: The following fields were not initialised during __init__: {'verbose'} upon upgrading.

I think this - plus a note in the next release - is probably enough for the subset of users who define custom solvers (and probably know optimistix quite well). It is raised from inside equinox, though, which makes it a little less obvious. I'm happy to improve this - WDYT?

I have "tested" this by using it in a notebook, but not otherwise.

This follows up on #56 (comment).

@patrick-kidger patrick-kidger changed the base branch from main to dev December 21, 2024 21:56
@patrick-kidger patrick-kidger merged commit eb8d50e into patrick-kidger:dev Dec 21, 2024
2 checks passed
@patrick-kidger
Copy link
Owner

LGTM! Merged on to the dev branch :)

@johannahaffner
Copy link
Contributor Author

Thanks!

patrick-kidger pushed a commit that referenced this pull request Dec 24, 2024
* adding a verbose option to BFGS

* adding default values for verbose option to custom BFGS solvers

---------

Co-authored-by: Johanna Haffner <[email protected]>
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 this pull request may close these issues.

2 participants