You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, it seems that the Python API does not expose the last value of the optimization parameters when exiting early due to an exception. This is in contrast to the C API (I think - haven't actually experimented with it yet), as the C API takes the optimization parameters as double* (directly modifying the input), but the low-level Python API assumes it's given a const double* (modifying a copy of the input).
Accessing the last value of the parameters would mostly be useful for failure due to roundoff - as the docs mention, their value is often still useful in this case.
Is there some way I'm missing, other than using a closure and copying every value of the optimization parameters in the objective function, to handle this problem in Python? If not, and if you're interested, I'd be happy to PR a patch to copy the last value over to the input parameters on roundoff exit, or to expose a method to access the last parameter value.
Thanks!
The text was updated successfully, but these errors were encountered:
Currently, it seems that the Python API does not expose the last value of the optimization parameters when exiting early due to an exception. This is in contrast to the C API (I think - haven't actually experimented with it yet), as the C API takes the optimization parameters as
double*
(directly modifying the input), but the low-level Python API assumes it's given aconst double*
(modifying a copy of the input).Accessing the last value of the parameters would mostly be useful for failure due to roundoff - as the docs mention, their value is often still useful in this case.
Is there some way I'm missing, other than using a closure and copying every value of the optimization parameters in the objective function, to handle this problem in Python? If not, and if you're interested, I'd be happy to PR a patch to copy the last value over to the input parameters on roundoff exit, or to expose a method to access the last parameter value.
Thanks!
The text was updated successfully, but these errors were encountered: