patrick-kidger / patrick-kidger/optimistix

Optimization with state

Open
#83 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
623
Forks
54
PR merge metrics
No merged PRs in 30d

Description

Suppose I have an optimization problem where the function to be optimized requires solving some expensive iterative sub-problem. It would be efficient if I could re-use the solution from the last step of the optimizer to warm start the next step. Something like

def myfun(x, y0):
    y = expensive_subproblem(x, initial_guess=y0)
    return some_other_func(x,y), y

And a sketch of what I'm doing now:

for _ in range(maxiter):
    ((f, y), df) = jax.value_and_grad(myfun, argnums=0, has_aux=True)(x, y)
    x = optimizer_step(x, f, df)

Is something like this possible in optimistix?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository files or tests are named. Start by reading the optimizer API and tracing how objective values, gradients, and auxiliary state move through an optimization step. Done would require a decided approach for carrying warm-start state between iterations, with documented behavior and tests for the stateful objective case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.