Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install & Test open source optimization package #361

Closed
stephaniewankowicz opened this issue Aug 17, 2023 · 4 comments
Closed

Install & Test open source optimization package #361

stephaniewankowicz opened this issue Aug 17, 2023 · 4 comments
Assignees

Comments

@stephaniewankowicz
Copy link
Collaborator

To get qFit into SBGrid, we must find another solution to IBM's CPLEX (this is not open source). I suggest using https://github.com/cvxgrp/cvxpy. It seems to be the most robust of the packages, but I would love to get feedback from @blake-riley or @natechols, or anyone else.

@natechols
Copy link
Collaborator

I don't see any obvious red flags with these packages except that ECOS is GPL. That makes it radioactive to anyone developing software for commercial release (even as freeware), such as Schrodinger, Phenix, my day job, etc. But this is only a problem for qFit if you wanted other packages to reincorporate it, and it's still an improvement over the closed IBM library.

Of course this is the kind of switch that will have a large blast radius and require extensive re-testing and possibly parameter tuning.

@blake-riley
Copy link
Contributor

On top of this, we've been asking for CVXOPT --- this is a GPL package too.

At risk of getting too deep in weeds that I don't enjoy: I'm not sure whether "asking the user to install these packages" (cvxopt, cplex) counts as "distributing it with" our source code --- we've been asking users to install it in a separate step? Though I don't disagree that including it as a requirement makes it harder (e.g. for Phenix) since installation of bigger packages tend to do things in one step, it's definitely feels closer to a 'redistribution'.

@blake-riley
Copy link
Contributor

blake-riley commented Sep 18, 2023

As for cvxpy: as far as I can tell, it's a wrapper around the various solver 'engines' (ECOS, SCS, OSQP), that has some bonus logic to make it easier to describe problems mathematically (rather than construct the P, q, and constraint matrices yourself).

Since it's just wrapping (MI)OSQP, and the code for constructing our constraint matrix that was buried in an old commit, I've just resurrected that.

I don't think it's a great idea to write an abstraction (src/qfit/solvers.py) of an abstraction (cvxpy) of a solver.
Too many layers of indirection.

Unless maybe I'm missing some context, Steph?

@blake-riley
Copy link
Contributor

PySCIPOpt is MIT licensed, and that wraps SCIP (v8 is Apache 2 licensed).
I'll add a solver for this in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants