Issues running the latest versions of Python-MIP on AWS lambda functions
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with mip/cbc.py around line 603 and the installation instructions linked in the issue. Compare versions 1.13.0, 1.14.0, and 1.15.0 in an AWS Lambda environment using Python 3.9 on Amazon Linux 2, including the manually supplied CBC binaries. Done means identifying the cause of the cbclib import failure and documenting or fixing the solver performance difference.
Written by the indexing model from the issue text.
Description
Bug
With the two latest versions of Python-MIP (1.14.0 and 1.15.0) I seem to have issues running on AWS lambda functions. When calling the lambda function, the issue that appears is the following:
import mip.cbc\n File \"/tmp/sls-py-req/mip/cbc.py\", line 603, in <module>\n Osi_getNumCols = cbclib.Osi_getNumCols\nNameError: name 'cbclib' is not defined\n"
This issue is also reported in other places, and, as far as I understand it, the proposed solution is to add the CBC binaries manually, as described here: https://python-mip.readthedocs.io/en/latest/install.html
This solved the aforementioned error. However, this seems to be resulting in much longer solving times (sometimes more than doubling). Is this a known or explainable issue? Are there alternatives for resolving the initial problem?
Important to mention is that the reason for wanting to upgrade from 1.13.0 to 1.15.0 is that when calling the solver multiple times in a row, the solver sometimes seems to get stuck in an infinite loop (reproducing the error doesn't seem to be easy, as it seems to be machine/OS-dependent). My guess was that that issue was solved in https://github.com/coin-or/Cbc/commit/e008a3644f0d31f312574f2c9e25fdc463c69255
Lambda function specifications:
- OS: Amazon Linux 2 (see https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html)
- Python version: 3.9
- Thanks in advance! Feel free to ask questions if anything is missing or unclear.
- Dominant language
- Linear Programming
- Stars
- 601
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from coin-or/python-mip
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
coin-or/python-mip#426 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
coin-or/python-mip#425 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
coin-or/python-mip#423 · 4 comments · 3 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
coin-or/python-mip#422 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
coin-or/python-mip#420 · 4 comments ·
All issues in coin-or/python-mip
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area/profiles comp/cli comp/dashboard P2 sweeper:risk-session-state type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NousResearch/hermes-agent#122365 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/production-stack#1105 ·
-
bug priority:low
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
CyberAgent/psd2svg#430 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100