benchopt
benchopt copied to clipboard
DOC documentation of callback
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?
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 ?