Closed dhendryc closed 2 years ago
ping @Wikunia
It should be due to https://github.com/Wikunia/Bonobo.jl/blob/main/src/Bonobo.jl#L291 do you have an example where this isn't the case?
Interesting... When is this called?
Yes, I have an example there that does not work. I don't know if I can create a minimal working example though.
it seems like it could not be the case in the callback for instance?
No, the sort_solutions!
is called after we exit the loop in optimize!
. That's fine.
But you sort with :max sense. Should that depend on the problem sense?
In our case, we want the minimal solution.
I sort by reverse sense == :Max
as internally everything is for minimization problems. @matbesancon yes for callbacks one would need to call something else though I'm not sure whether it makes sense to call result in that callback.
Yes, you are right. It was an issue on our side. The callback is called before sort_solutions!
. Fixed it!
Currently the first of the collect solutions is returned. That isn't necessarily the correct one, though.