NUAA-AL / ALiPy

ALiPy: Active Learning in Python is an active learning python toolbox, which allows users to conveniently evaluate, compare and analyze the performance of active learning methods.

Home Page:http://parnec.nuaa.edu.cn/huangsj/alipy/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

xuehuachunsheng opened this issue · comments

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.

commented

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.