coin-or / coin-or/python-mip

Issues running the latest versions of Python-MIP on AWS lambda functions

Open
#334 8 comments 1 reaction 0 assignees View on GitHub
cbc
Dominant language
Linear Programming
Stars
600
Forks
108
PR merge metrics
No merged PRs in 30d

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 \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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.