MLBox icon indicating copy to clipboard operation
MLBox copied to clipboard

pytest fails with OSError: dlopen: cannot load any more object with static TLS

Open jimthompson5802 opened this issue 6 years ago • 0 comments

OS: MacOS 10.14.6 Docker for Mac: 2.1.01 docker base image: continuumio/minconda3:4.3.27 mlbox: 0.8.0 Python: 3.6

pytest unit tests fail with error OSError: dlopen: cannot load any more object with static TLS. This contains full error log mlbox_pytest_failure_static_tls_py36.txt

In researching this issue, found this posting. The dlopen error in this posting was solved by changing the order of imports. From this, I changed the oder of imports in mlbox/model/classification/classifier.py for 'lightgbm'. See this screenshot for the change of import order, i.e., import lightgbm before the sklearn imports. Screen Shot 2019-08-10 at 10 21 19

With this change, the all the unit test cases pass. Here is the pytest run log after changing import order. mlbox_pytest_run_afer_import_change.txt

I'll submit a PR to address this issue.

For reference, this is the Dockerfile used for this test.

FROM continuumio/miniconda3:4.3.27

# 
# install additional packages
#
RUN pip install mlflow mlbox

WORKDIR /opt/project
ENV MLFLOW_TRACKING_URI /opt/project/tracking

jimthompson5802 avatar Aug 10 '19 14:08 jimthompson5802