Using Gurobi with joblib in Python
AnsweredHi all,
As part of my code in Python I need to formulate and solve independent Gurobi models on different cores in Python and I am using joblib to do so. However, with more than 1 core the code does not work. This is the error message I received.
A task has failed to un-serialize. Please ensure that the arguments of the function are all picklable.
I think the error is due to Gurobi models being not picklable. But, after an extensive search I could not find a resolution to this problem.
0
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi,
Please note Gurobi environments GRBEnv are not thread safe. So if you do something like this, you will have to make sure that every model has its own GRBEnv. This is a bit tricky in Python, please see here.
Best regards,
Sonja
0
Post is closed for comments.
Comments
2 comments