Closed EmJay276 closed 1 year ago
But
mosek.dparam.intpnt_tol_dfeas
and
mosek.iparam.intpnt_solve_form
most likely has the same value and that is legal. I am not a cvxpy expert but to me it seems you do something wrong. Maybe you should quote the keys.
I think you can do
mosek_params = {'MSK_DPAR_INTPNT_TOL_DFEAS': 1.0e-8, 'MSK_IPAR_INNTPNT_SOLVE_FORM' : 'MSK_SOLVE_DUAL' }
Cvxpy documentation :
'mosek_params' A dictionary of MOSEK parameters. Refer to MOSEK’s Python or C API for details. Note that if parameters are given as string-value pairs, parameter names must be of the form 'MSK_DPAR_BASIS_TOL_X' as in the C API. Alternatively, Python enum options like 'mosek.dparam.basis_tol_x' are also supported.
Thanks for the for response and advide, I solved it by using the string version for the keys.
mosek_params = {'MSK_DPAR_INTPNT_TOL_DFEAS': 1.0e-8,
'MSK_IPAR_INTPNT_SOLVE_FORM': mosek.solveform.dual}
most likely has the same value and that is legal. I am not a cvxpy expert but to me it seems you do something wrong. Maybe you should quote the keys.
The hash values are probably unique (I haven't checked all) within mosek.iparam
and mosek.dparam
but not across them.
The parameter keys (eg. mosek.dparam.intpnt_tol_dfeas
) are directly passed to back to mosek within cvxpy (source) , so I don't think it is a cvxpy issue.
Of course it could be fixed / work arounded within cvxpy by supplying different dicts for iparam
and dparam
, but I more likely think the values in the mosek
package should be unique, not only within each of iparam
and dparam
but also across them.
I will have our cvxpy expert to look into this and report back to cvxpy developers if their implementation is broken.
Personally I would use string version since this should be rock solid.
@erling-d-andersen @phschiele determined the source of the issue https://github.com/cvxpy/cvxpy/issues/2023#issuecomment-1405814496 . It is due to the use of a custom Enum class instead of the build in class.
I will close this here because it is not an issue in Mosek. The discussion about how to best fix cvxpy
can take place in the cvxpy
issue.
I am using cvxpy with the python mosek package. When I try to pass
mosek.dparam.intpnt_tol_dfeas
andmosek.iparam.intpnt_solve_form
as keys to a python dict it results in dict with just one entry. The hases ofmosek.dparam.intpnt_tol_dfeas
andmosek.iparam.intpnt_solve_form
are the same!Result
Hashes