GradientProblemSolver::Options does not support update_state_every_iteration #246

Open
bchretien opened this Issue Dec 21, 2016 · 5 comments

Comments

Projects
None yet
2 participants

bchretien commented Dec 21, 2016 edited

While implementing a callback for GradientProblemSolver, I realized that update_state_every_iteration is not supported for that kind of solver. Yet, GradientProblemSolver::Options::callbacks's documentation hints at the contrary (here):

// Callbacks are executed in the order that they are specified in
// this vector. By default, parameter blocks are updated only at
// the end of the optimization, i.e when the Minimizer
// terminates. This behaviour is controlled by
// update_state_every_variable. If the user wishes to have access
// to the update parameter blocks when his/her callbacks are
// executed, then set update_state_every_iteration to true.

Are there any plans to support this option, or am I missing something? Otherwise, the documentation should probably be updated. Also, update_state_every_variable is referenced, but I'm assuming this is a typo/legacy name for update_state_every_iteration (it is also present in some other parts of the documentation).

This was tested with Ceres 1.12.0.

bchretien changed the title from GradientProblemSolver::Options does not support update_state_every_variable to GradientProblemSolver::Options does not support update_state_every_iteration Dec 21, 2016

sandwichmaker self-assigned this Dec 21, 2016

sandwichmaker added the bug label Dec 21, 2016

Contributor

sandwichmaker commented Dec 21, 2016

@bchretien thanks for reporting this, yes this is a bug in gradientproblemsolver, even though the underlying machinery actually supports this. You can either submit a patch or I can look into it soonish.

@sandwichmaker thanks for the quick reply, I probably won't have the time to work on a patch during the next few weeks, but I'll keep you posted if that changes.

@bchretien bchretien added a commit to bchretien/ceres-solver that referenced this issue Dec 22, 2016

@bchretien bchretien Add update_state_every_iteration option to GradientProblemSolver
Fix #246
c4a6185

bchretien commented Dec 22, 2016 edited

I think I solved the issue (cf. this). I'll forward this to Gerrit when I find the time.

@bchretien bchretien added a commit to bchretien/ceres-solver that referenced this issue Dec 22, 2016

@bchretien bchretien Add update_state_every_iteration option to GradientProblemSolver
Fix #246
cb04240

@bchretien bchretien added a commit to bchretien/ceres-solver that referenced this issue Dec 22, 2016

@bchretien bchretien Add update_state_every_iteration option to GradientProblemSolver
Fix #246
b9159fb
Contributor

sandwichmaker commented Dec 23, 2016

@bchretien that CL looks pretty good. Please do consider sending it to gerrit, I will review as soon as I can.

Contributor

sandwichmaker commented Mar 9, 2017

@bchretien gentle ping :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment