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
It does not seem to be a way to redirect this output to a file or string without using external process call. Could you please add a handle to redirect a log to a file or pipe, or even better, store it in a separate solver state to be taken directly via interop?
The text was updated successfully, but these errors were encountered:
You are right, there is presently no way of redirecting the solver output. We could probably add something that allows redirecting of the solver output to a file or a string buffer. It's unclear to me if one could enable redirection to a pipe (or socket or whatever) when calling the solver via one of its language interfaces, since I assume (but am not certain) that conversion of general io targets between languages is ugly.
This would probably be easiest to do at module level, i.e. all solvers would write to the same target. Could also be done on a per solver instance basis though.
Indeed. In my experience, a proper optimization log is an important part of the result. So in KMath log is the part of the optimization result. It is done a bit differently. Log consumer is passed as an optional parameter to an optimizer, but callbacks are hard to implement on the cross-language boundary. So simple string will do.
This issue arisen during discussion of atraplet/clarabel4j#30
Currently optimization output is hardcoded for
stdout
:Clarabel.rs/src/solver/implementations/default/info_print.rs
Line 46 in 902d4c9
It does not seem to be a way to redirect this output to a file or string without using external process call. Could you please add a handle to redirect a log to a file or pipe, or even better, store it in a separate solver state to be taken directly via interop?
The text was updated successfully, but these errors were encountered: