-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Re-distribute Gurobi in Drake binary releases #10804
Comments
No, we don't support providing your own commercial solver licenses or libraries at present. Enabling Gurobi support is currently a compile-time decision. We could add support for loading commercial solvers at runtime if available, but it would be an architectural change. |
... and to further clarify the "add support for loading commercial solvers at runtime if available": That would entail linking or loading |
i understand. thanks. just to collect all of these thoughts in one place... the other alternative, I would think, is to have gurobi_solver.o always in the binary release, and have it check the license file (instead of loading the obj file) to confirm availability. would this be better? (conditional on us obtaining permission for redistributing it) |
My reading of EULA suggests that part would not necessarily be a problem, but someone would need to check for any (other) constraints. |
I think we probably want a license check as well regardless to be nice to the end-user. |
@RussTedrake The easiest solution along those lines would be if we have permission to redistribute both the If we only have permission to redistribute |
My thoughts were along the lines of a |
Just to check: Can I ask what situation this accommodates, or what use case? |
My impression of the user story was "Most people are happy to just use Drake binary releases. If they have a (site) license to Gurobi, it would be nice if that Just Worked out of the box. The need is especially acute for users without a site license to SNOPT -- in that case, even if they compile from source in order to use Gurobi, they then lose the ability to use SNOPT". |
correct. and that happens to account for most of the academic world, as gurobi is free for academics, but SNOPT is not. |
Use case understood. Is there a research group/class actively blocked by this to gauge timing? Wondering if there's a work around such as using Colab or asking the dept. to get a license for $600. |
Since the next action on this issue is to see if MIT has the right to redistribute Gurobi stuff (per details above), maybe the easy answer is to reassign this issue to Russ, and he can pursue that question with MIT legal on whatever pace it requires? |
I guess @tri-ltyyu could also own it and chase down MIT legal. All I'm really saying is that @jamiesnape isn't an appropriate assignee anymore. |
Happy to chase someone down to find out, but want to confirm if it's MIT legal or Gurobi legal that we want to get permission from? From Gurobi's EULA, I see the following, which makes me think we need permission from them first? |
Ultimately, it would need to be Gurobi. Whether it is you or Russ or MIT who makes the request to Gurobi is a slightly different question. The license on CI is officially assigned to MIT CSAIL with Russ as the administrator. |
FYI #13279 has implemented this now. |
Just noticed this for the first time: https://www.gurobi.com/license-center/for-online-courses/ I wonder if that changes anything? |
Difficult to say for certain. Probably not, but it could give you a different avenue to talking to Gurobi. The redistribute part of the license is the problem, and I do not suppose the new license changes that. I doubt it changes anything for Colab, for example. |
Another option here might be to write a |
Just stumbled on this, which might be relevant for the "license on deepnote / colab (if that ever comes back)": https://support.gurobi.com/hc/en-us/articles/4409582394769-Google-Colab-Installation-and-Licensing |
@RussTedrake with the uptick in some of the new optimal planning code in Drake and Drake-adjacent projects, it seems like everyone wants Gurobi, so then rebuilds Drake from source, but then loses SNOPT. I'm thinking about resurrecting this work and trying to reach out to Gurobi people for a redistribution license. Do you have any input before I start that? (email is fine too) |
No updates from me. I agree with your assessment! |
To expand upon my proposal above (#10804 (comment))... I'm proposing adding a new class
That would allow Python users of Drake to easily use Gurobi to solve their optimization programs with only a license key, without recompilation. C++ users of Gurobi would still need to rebuild Drake from source. The ongoing maintenance burden would be that we need to maintain two copies of the @hongkai-dai could you offer any general feedback or advice about this proposal? |
I should also add -- since the program is convex the only Python/C++ calling cost overhead would be while iterating through the costs and constraints. During the solve, the are no nonlinear constraints that would require per-step callbacks crossing the C++/Python GIL boundary. |
@RussTedrake @hongkai-dai I would be curious to hear your thoughts about the proposal upthread (see the prior two messages). My proposal is that we solve this packaging issue for Python users only. Python users would be able to After the Python part is working, my proposal is to close this issue, and not attempt any C++ integration for our prepackaged releases. |
Sorry I somehow missed your previous message. I think implementing GurobiPySolver should work. I have been using gurobi's python interface in my personal project and got relatively familiar with it. I can work on this in my spare time. What is the timeline for adding GurobiPySolver? |
I don't have any specific goal in mind for a release date of the feature. I'm sure many users would enjoy having it, but I haven't gotten any recent requests myself. (Russ would probably know more on that front.) The main purpose of my question was to able to remove the "redistribute libgurobi.so" from my build system task list. If we can agree to give up on C++ support, I can focus my energy elsewhere. |
I think it will be an additional support burden (especially for Hongkai). But I agree it seems the best solution. |
Do we expect it could result in a significant performance hit? |
#10804 (comment) is my current guess re: performance impact. We'll have to see how it turns out, though. |
Actually, we may not need to use |
That would be fantastic! |
Edit: The original issue title was "Can users with a gurobi license (and no snopt license) use gurobi AND snopt?". We've retitled to reflect a new consensus now.
I wasn't able to find any documentation about this on our site. perhaps we can add it?
Can (or does) the binary distribution include gurobi bindings, but fail if the gurobi libraries aren't found?
I believe the alternative (having someone build from source and get snopt, despite not having the snopt source) is much harder to achieve?
@jamiesnape -- tagging you to get the current status first.
The text was updated successfully, but these errors were encountered: