MazeLocalLauncher¶
-
class
hydra_plugins.maze_local_launcher.
MazeLocalLauncher
(*args: Any, **kwargs: Any)¶ Custom Hydra launcher distributing the jobs in separate processes on the local machine.
The implementation is based on https://github.com/facebookresearch/hydra/blob/master/examples/plugins/example_launcher_plugin/hydra_plugins/example_launcher_plugin/example_launcher.py.
- Parameters
n_jobs – Maximum number of parallel jobs. If -1, all CPUs are used.
-
launch
(job_overrides: Sequence[Sequence[str]], initial_job_idx: int) → Sequence[hydra.core.utils.JobReturn]¶ Implementation of Launcher.launch
- Parameters
job_overrides – a List of List<String>, where each inner list is the arguments for one job run.
initial_job_idx – Initial job idx in batch.
- Returns
an array of return values from run_job with indexes corresponding to the input list indexes.
-
setup
(config: omegaconf.DictConfig, config_loader: hydra.core.config_loader.ConfigLoader, task_function: hydra.TaskFunction) → None¶ Implementation of Launcher.setup, called before the launch
- Parameters
config – The master config
config_loader – The config loader, used to derive the job configurations from the sweep run.
task_function – The job entry point as function object. This is not used at all, as it is much simpler to call the same command from bash than to serialize the function object, transfer it to the pod and calling the deserialized method there.