jaxopt icon indicating copy to clipboard operation
jaxopt copied to clipboard

OSQP should inherit from IterativeSolver

Open mblondel opened this issue 2 years ago • 1 comments

This way, we can use the update method with it.

mblondel avatar Aug 31 '23 09:08 mblondel

It is certainly possible, but what is the advantage of doing so compared to just using BoxOSQP instead ?

I'm afraid that the fix is not straighforwarsd since it may break consistency of the API or induce a runtime cost.

In jaxopt, typically, the params tuple expected by update() has the same signature as the one expected by run() or returned by init_params. Here, however the run of OSQP delegates to BoxOSQP, which has a different signature. So, either the OSQP.update() method would have a different signature by delegating the call to BoxOSQP.update (unexpected and inconsistent), either it performs the translation between the two problems formulations back and forth at each iteration (thanks to OSQP_to_BoxOSQP object), in which case it might be expensive (even though it is not the bottleneck).

Algue-Rythme avatar Oct 17 '23 08:10 Algue-Rythme