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

Add worker config to force multiprocessing #2401

Merged
merged 1 commit into from
Apr 14, 2018

Conversation

riga
Copy link
Contributor

@riga riga commented Apr 14, 2018

Description

At the moment, luigi uses multiprocessing for tasks only when the number of requested workers is > 1. In some situations, it might be helpful if this was also the case for exactly 1 worker (e.g. when the executed code does something nasty with the main process, TensorFlow in our case). I added a worker config force_multiprocessing which, when True, forces multiprocessing to be used independent of the number of workers. I also added a few lines to the docs.

Have you tested this? If so, how?

Yup, there are two additional tests now in test/worker_multiprocess_test.py that check if the created TaskProcess instance received the correct multiprocessing flag.

@Tarrasch Tarrasch merged commit 4af1d22 into spotify:master Apr 14, 2018
@Tarrasch
Copy link
Contributor

Awesome! Thanks!

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 this pull request may close these issues.

2 participants