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

Support use of multiprocessing start methods other than "spawn" (e.g. "dragon") #554

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cubed/runtime/executors/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ async def async_execute_dag(
check_runtime_memory(spec, max_workers)
if use_processes:
max_tasks_per_child = kwargs.pop("max_tasks_per_child", None)
context = multiprocessing.get_context("spawn")
if isinstance(use_processes, str):
context = multiprocessing.get_context(use_processes)
else:
context = multiprocessing.get_context("spawn")
# max_tasks_per_child is only supported from Python 3.11
if max_tasks_per_child is None:
concurrent_executor = ProcessPoolExecutor(
Expand Down
Loading