Feature request: CPUDistributingLocalScheduler
with separate processes per hyperparam. run
#79
Labels
enhancement
New feature or request
Disclaimer: requires a feature only available from
python>=3.11
.What: Initialize the
concurrent.futures.ProcessPoolExecutor
used inCPUDistributingLocalScheduler
with the new parametermax_tasks_per_child
to control the amount of tasks (~hyperparameter runs) per process:If
max_tasks_per_child
isNone
, the scheduler behaves as usual. If provided a number, each child process will terminate after the specified amount of runs. If this number is 1, each hyperparam. run will run in its own process.Why: This feature is useful for programs that you'd like to distribute over CPUs, but need to be in separate processes each (i.e. you can't reuse processes for running multiple runs sequentially).
How: Add a yaml config bool attribute
one_process_per_run
that, when usingscheduler: "cpu_distribute"
, is passed to theCPUDistributingLocalScheduler
and handed on to theconcurrent.futures.ProcessPoolExecutor
as indicated above (link to location in code).The text was updated successfully, but these errors were encountered: