Multiprocessor parallel loops cannot be nested below threads

What is the reason for such a problem in joblib? "Multiprocessor parallel loops cannot be nested below threads by setting n_jobs = 1 'What should I do to avoid such a problem?

Actually, I need to implement an XMLRPC server that runs heavy computing in the background thread and reports on the current progress by polling the user interface from the client. It uses scikit-learn, which are based on joblib.

PS: I just changed the name of the thread to "MainThread" to avoid such a warning, and everything looks good (it runs in parallel, as expected, without problems). What could be a problem in the future for such a workaround?

+7
scikit-learn python-multithreading joblib
source share
1 answer

This seems to be related to the issue in the JobLib library. At the time of writing, this seems to be fixed, but not yet released. As the question says, a dirty fix would rename the main thread back to MainThread :

threading.current_thread().name = 'MainThread'

0
source share

All Articles