mlrl.testbed_slurm.runner module¶
Author: Michael Rapp (michael.rapp.ml@gmail.com)
Provides classes that allow to run experiments via the Slurm Workload Manager.
- class mlrl.testbed_slurm.runner.JobArray(command: ~mlrl.testbed.command.Command, command_modifier: ~typing.Callable[[~mlrl.testbed.command.Command], ~mlrl.testbed.command.Command], file_name_modifier: ~typing.Callable[[str], str], task_ids: set[int] = <factory>)¶
Bases:
objectDefines a Slurm job array.
- Attributes:
command: The command to be executed command_modifier: A function that modifies a given command such that it can be used in the job array file_name_modifier: A function that modifies a given file name such that it can be used in the job array task_ids: The task ids to be used in the job array
- property formatted_task_ids: str | None¶
The task ids to be used in the job array formatted such that they can be used as the value or the sbatch argument “–array”.
- class mlrl.testbed_slurm.runner.SlurmRunner¶
Bases:
RunnerA BatchMode.Runner that allows to run experiments via the Slurm Workload manager.
- class ConfigFile(file_path: Path, schema_file_path: Path)¶
Bases:
objectA YAML configuration file that configures Slurm jobs to be run.
- property after_script: list[str]¶
The shell commands to be executed after the experiment has finished.