Joblib executor
Documentation in joblib executor docstrings.
Module executors.joblib_executor
Overview
An executor that runs simulations in parallel using joblib.Parallel.
This executor integrates with an Enchanted Surrogates sampler to generate
parameter configurations and execute tasks concurrently on the local machine.
JoblibExecutor
JoblibExecutor(runner_config=None, output_dir=None, *args, **kwargs)
Bases: Executor
Features
- Uses
joblibto parallelize simulation tasks across available CPU cores. - Integrates with Enchanted Surrogates sampler for parameter exploration.
- Generates a unique run directory for each sample.
- Automatically registers completed futures with the sampler.
Notes
- This executor does not manage clusters; it runs everything locally.
- No dynamic scaling or distributed execution is supported.
- Cleanup is minimal since
joblibruns in-process and does not leave persistent resources.
Source code in src/enchanted_surrogates/executors/base_executor.py
8 9 10 | |
execute
execute(input, sampler)
Execute simulation tasks in parallel using joblib.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
list[str, dict]
|
A list of simulation tasks to execute. Each element is a tuple consisting of path to the directory where the simulation run should be executed and dictionary of simulation parameters. |
required |
sampler
|
object
|
Sampler instance responsible for tracking submitted simulation tasks |
required |
Source code in src/enchanted_surrogates/executors/joblib_executor.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 | |