Closed stephaniewankowicz closed 2 months ago
IMO, this was done in #363, which reimplemented cvxopt (QP), osqp (QP) and miosqp (MIQP).
The choice can be made with --qp-solver
and --miqp-solver
respectively.
Or is this just an issue to track until dev is merged with main?
The open MIQP solver does not work currently (https://github.com/osqp/miosqp)
It crashes? Doesn't load? Can you give me a crash log, and I'll look into it tonight?
This issue is with the following line:
class MIOSQPSolver(MIQPSolver): driver_pkg_name = "miosqp" driver = lazy_load_module_if_available(driver_pkg_name) if TYPE_CHECKING: import miosqp
The import fails. This package is not included in osqp. (https://github.com/osqp/miosqp)
That's correct. miosqp
is a separate package.
Unfortunately though, the authors haven't distributed it in the pip repositories, only on GitHub.
I would guess that your issue is because miosqp isn't installing with qfit.
It's not installing for 2 reasons:
setup.py
. Where it says extra_dependencies
, it should read extras_require
.pip install .
(or pip install qfit
one day, I guess), you'd have to specify the set of qfit "extensions" you'd like in square-brackets (pip install .[osqp]
or pip install .[cplex,osqp]
).[^cplex]Proposed fix
Since we need to have at least one set of solvers, we should probably make the osqp solvers install by default, and just include them straight up in the install_requires
. This would likely satisfy SBGrid.
I will put in a PR to fix this tonight.
[^cplex]: Even then, cplex is only partially available through pip, so this only really works on old macs, or on linux machines.
Completed in a different PR
We want a set of working open solvers to be able to put qFit into SBGrid