tierkreis.controller.executor.hpc.hpc_executor¶
Interface implementation for HPCExecutors.
Module Contents¶
Classes¶
Generic protocol for an HPC executor. |
Functions¶
Generate a scheduler script by calling a template function. |
|
Run a worker function on an HPC executor. |
Data¶
API¶
- tierkreis.controller.executor.hpc.hpc_executor.logger = 'getLogger(...)'¶
- class tierkreis.controller.executor.hpc.hpc_executor.HPCExecutor¶
Bases:
typing.ProtocolGeneric protocol for an HPC executor.
- Fields:
- launchers_path (Path | None): The locations to search for workers.
This will change the location from where the command is invoked by appending “cd launchers_path && “
logs_path (Path): The controller log file. errors_path (Path): The controller error file for the function node. spec (JobSpec): A definition of the job specification. script_fn (Callable[[JobSpec], str]): A template function to generate the
submission script from.
command (str): The base command to use.
- launchers_path: pathlib.Path | None = None¶
- logs_path: pathlib.Path = None¶
- errors_path: pathlib.Path = None¶
- spec: tierkreis.controller.executor.hpc.job_spec.JobSpec = None¶
- script_fn: collections.abc.Callable[[tierkreis.controller.executor.hpc.job_spec.JobSpec], str] = None¶
- __slots__ = ()¶
- classmethod __init_subclass__(*args, **kwargs)¶
- classmethod __class_getitem__(item)¶
- tierkreis.controller.executor.hpc.hpc_executor.generate_script(template_fn: collections.abc.Callable[[tierkreis.controller.executor.hpc.job_spec.JobSpec], str], spec: tierkreis.controller.executor.hpc.job_spec.JobSpec, path: pathlib.Path) None¶
Generate a scheduler script by calling a template function.
- tierkreis.controller.executor.hpc.hpc_executor.run_hpc_executor(executor: tierkreis.controller.executor.hpc.hpc_executor.HPCExecutor, launcher_name: str, worker_call_args_path: pathlib.Path) tierkreis.controller.storage.data.ExecutorDebugData¶
Run a worker function on an HPC executor.
This is a generic function to run with with an HPC executor. Similar to the
tierkreis.controller.executor.protocol.ControllerExecutorrun function.- Parameters:
executor (HPCExecutor) – The executor to use for running
launcher_name (str) – Module description for the worker to run
worker_call_args_path (Path) – Location of the worker call args.
- Raises:
TierkreisError – When job submission fails.