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

Possible Bug in get_query_strategy/query_labels.py Line 1279-1285 #9

Open
xuehuachunsheng opened this issue Mar 8, 2019 · 1 comment

Comments

@xuehuachunsheng
Copy link

When I use QueryInstanceSPAL to replace the "strategy" parameter in "al.set_query_strategy(strategy)", this line "al.start_query(multi_thread=True)" can not be done because in multi_thread model, pickle.dump would throw an error, namely 'TypeError: can't pickle module objects error'.
So, I suggest that "import cvxpy" is located at the out of the class to avoid that.
"cvxpy" can be treated as a basic dependency.

@tangypnuaa
Copy link
Collaborator

Hey, Thanks for reporting this issue.

Actually, we have noticed about the pickle problem and fixed it in the dev branch by adding __setstate__() and __getstate__() methods to avoid raising when pickling SPAL and BMDR object.

For the multi_thread problem, we are still looking for a solution. For now, please set multi_thread=False if you are using a multi_thread model.

To install cvxpy, a C compiler is needed which may not be installed by everyone in Windows platform. So we make it an optional dependency because only SPAL and BMDR methods depend on this package.

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

No branches or pull requests

2 participants