benchopt icon indicating copy to clipboard operation
benchopt copied to clipboard

DOC documentation of callback

Open leonzheng2 opened this issue 2 years ago • 1 comments

In https://benchopt.github.io/performance_curves.html?highlight=callback, callback takes as argument x in the code snippet. What should be x? Should it be the same type of output as the one of get_result?

leonzheng2 avatar Jul 04 '23 08:07 leonzheng2

yes, it's what happens in these two lines in callback.py: https://github.com/benchopt/benchopt/blob/main/benchopt/callback.py#L71 https://github.com/benchopt/benchopt/blob/main/benchopt/callback.py#L84

x is fed to Objective.__call__() which itself calls Objective.compute(). So it should be of the type of solver.get_result, which is also what is fed to Objective.compute

in #576 we're moving this type from numpy arrays to dictionaries for more flexibility

Can you send a PR to the documentation ?

mathurinm avatar Jul 04 '23 09:07 mathurinm