LocalRunner#
- class LocalRunner[source]#
Bases:
Runner
Runs each command locally using different processes for each command/split.
This is implemented by generating a Makefile and then running it using make.
- __init__()#
Methods
__init__
()build_makefile_string
(cfg_json_uri, ...[, ...])Get the split_ind for the process.
run
(cfg_json_uri, pipeline, commands[, ...])Run commands in a Pipeline using a serialized PipelineConfig.
run_command
(cmd)Run a single command.
- build_makefile_string(cfg_json_uri: str, pipeline: Pipeline, commands: list[str], num_splits: int = 1) str [source]#
- get_split_ind() int | None #
Get the split_ind for the process.
For split commands, the split_ind determines which split of work to perform within the current OS process. The CLI has a –split-ind option, but some runners may have their own means of communicating the split_ind, and this method should be overridden in such cases. If this method returns None, then the –split-ind option will be used. If both are null, then it won’t be possible to run the command.
- Return type:
int | None