patrick-kidger / patrick-kidger/optimistix
Question about `BestSoFar` wrapper and handling of `max_steps`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 623
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
First, I'd like to say thank you for this fantastic package! The active development and quality of the documentation are truly appreciated and inspiring. I am a recent user of jax and this type of work makes you appreciate even more how incredible it is.
I have two questions:
-
Understanding the
BestSoFarwrapper: As I understand it, this wrapper returns the parameters that achieved the best objective value during the entire search, rather than the parameters from the final step. For example, if a search evaluated three points,x_1,x_2, andx_3, with objective valuesf(x_2) < f(x_3) < f(x_1), theBestSoFarwrapper would returnx_2. Is this understanding correct? -
Behavior upon reaching
max_steps: I've noticed that when an optimization reachesmax_steps, an error is raised. This seems to differ from a library like SciPy, which would simply stop and return the last state. Is this correct? For my use case, it would be very useful to get the best result found, even if the optimization terminated by reachingmax_steps. Is there a recommended way to achieve this and avoid the error?
Thank you again for your time and effort on this project.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the implementation and documentation for the BestSoFar wrapper and max_steps handling, then inspect how termination errors are surfaced. Clarify whether the wrapper retains the best result at the step limit and document or define the recommended behavior for that case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100