Skip to content
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

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

Open
jimthompson5802 opened this issue Aug 10, 2019 · 0 comments

Comments

@jimthompson5802
Copy link

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 jimthompson5802 changed the title purest fails with OSError: dlopen: cannot load any more object with static TLS pytest fails with OSError: dlopen: cannot load any more object with static TLS Aug 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant