cvxgrp/cvxpygen

Feature Request: Support passing attributes to the solvers

ilyanoskov opened this issue · 1 comments

Dear maintainers,

I am trying to pass polish=True or verbose=True in this code

https://github.com/cvxgrp/cvxpygen/blob/master/examples/portfolio.ipynb to the OSQP solver, and I get the following error:

AttributeError                            Traceback (most recent call last)
~/coding/cvxpygen/examples/portfolio_code/cpg_solver.py in cpg_solve(prob, updated_params, **kwargs)
     30         try:
---> 31             eval('cpg_module.set_solver_%s(value)' % key)
     32         except AttributeError:

~/coding/cvxpygen/examples/portfolio_code/cpg_solver.py in <module>

AttributeError: module 'portfolio_code.cpg_module' has no attribute 'set_solver_polish'

Could you please add the possibility to pass attributes to solvers? Thank you very much in advance.

Thanks @ilyanoskov - cvxpygen does support passing attributes to the solvers. In the case of OSQP, these are rho, max_iter, eps_abs, eps_rel, eps_prim_inf, eps_dual_inf, alpha, scaled_termination, check_termination, warm_start. For further info, see the OSQP documentation. Opening #14 to document this better on cvxpygen side and closing this issue.