Is it possible to "continue" optimization from a full OptStep
?
#241
Unanswered
DanPuzzuoli
asked this question in
Q&A
Replies: 1 comment
-
Unfortunately, with For your own custom implementation it is worth reading the way we did it in jaxopt |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I'm playing around with trying to build some convenience functionality for doing a bunch of optimizations in JAXopt with different initial seeds. The landscape of the optimization problems I'm dealing is pretty complicated, so the number of iterations that an optimizer needs to take for different seeds can be wildly different. What I'm trying to build is a function that will run
n
optimizations, doingk
simultaneously by vectorizing the optimizer withvmap
, but that will check in everym
optimizer iterations to see if any of the seeds have finished. What I'm currently trying is settingmaxiter=m
when constructing the optimizer, then doing a loop in which:m
iterationsinit_params
taking less thanm
iterations are swapped out for new onesMy first attempt at this is working, but one issue I'm running into is that the optimizer state is totally reset in each iteration of the above loop, and hence any history in the corresponding
OptStep
for seeds that need to continue running is lost between loops. This ends up resulting in a single optimization ultimately taking more iterations than is necessary as things like step size or LBFGS history are lost. Is there any way to do something equivalent to passing a fullOptStep
object torun
, to continue an optimization for where it last left off?Beta Was this translation helpful? Give feedback.
All reactions