sierra.core.pipeline.stage2.exp_runner
Classes for executing experiments via the specified --exec-env
.
BatchExpRunner
: Runs each Experiment in Batch Experiment in sequence.ExpRunner
: Execute each Experimental Run in an Experiment.ExpShell
: Launch a shell which persists across experimental runs.
- class sierra.core.pipeline.stage2.exp_runner.BatchExpRunner(cmdopts: Dict[str, Any], criteria: BatchCriteria)[source]
Runs each Experiment in Batch Experiment in sequence.
- batch_exp_root
Absolute path to the root directory for the batch experiment inputs (i.e. experiment directories are placed in here).
- batch_stat_root
Absolute path to the root directory for statistics which are computed in stage {3,4} (i.e. experiment directories are placed in here).
- batch_stat_exec_root
Absolute path to the root directory for statistics which are generated as experiments run during stage 2 (e.g., how long each experiment took).
- cmdopts
Dictionary of parsed cmdline options.
- criteria
Batch criteria for the experiment.
- exec_exp_range
The subset of experiments in the batch to run (can be None to run all experiments in the batch).
Inheritance
- __dict__ = mappingproxy({'__module__': 'sierra.core.pipeline.stage2.exp_runner', '__doc__': 'Runs each :term:`Experiment` in :term:`Batch Experiment` in sequence.\n\n Attributes:\n\n batch_exp_root: Absolute path to the root directory for the batch\n experiment inputs (i.e. experiment directories are\n placed in here).\n\n batch_stat_root: Absolute path to the root directory for statistics\n which are computed in stage {3,4} (i.e. experiment\n directories are placed in here).\n\n batch_stat_exec_root: Absolute path to the root directory for statistics\n which are generated as experiments run during\n stage 2 (e.g., how long each experiment took).\n\n cmdopts: Dictionary of parsed cmdline options.\n\n criteria: Batch criteria for the experiment.\n\n exec_exp_range: The subset of experiments in the batch to run (can be\n None to run all experiments in the batch).\n\n ', '__init__': <function BatchExpRunner.__init__>, '__call__': <function BatchExpRunner.__call__>, '__dict__': <attribute '__dict__' of 'BatchExpRunner' objects>, '__weakref__': <attribute '__weakref__' of 'BatchExpRunner' objects>, '__annotations__': {}})
- __doc__ = 'Runs each :term:`Experiment` in :term:`Batch Experiment` in sequence.\n\n Attributes:\n\n batch_exp_root: Absolute path to the root directory for the batch\n experiment inputs (i.e. experiment directories are\n placed in here).\n\n batch_stat_root: Absolute path to the root directory for statistics\n which are computed in stage {3,4} (i.e. experiment\n directories are placed in here).\n\n batch_stat_exec_root: Absolute path to the root directory for statistics\n which are generated as experiments run during\n stage 2 (e.g., how long each experiment took).\n\n cmdopts: Dictionary of parsed cmdline options.\n\n criteria: Batch criteria for the experiment.\n\n exec_exp_range: The subset of experiments in the batch to run (can be\n None to run all experiments in the batch).\n\n '
- __module__ = 'sierra.core.pipeline.stage2.exp_runner'
- __weakref__
list of weak references to the object (if defined)
- class sierra.core.pipeline.stage2.exp_runner.ExpRunner(cmdopts: Dict[str, Any], exec_times_fpath: Path, generator: ExpShellCmdsGenerator, shell: ExpShell)[source]
Execute each Experimental Run in an Experiment.
In parallel if the selected execution environment supports it, otherwise sequentially.
Inheritance
- __call__(exp_input_root: Path, exp_num: int) None [source]
Execute experimental runs for a single experiment.
- __dict__ = mappingproxy({'__module__': 'sierra.core.pipeline.stage2.exp_runner', '__doc__': '\n Execute each :term:`Experimental Run` in an :term:`Experiment`.\n\n In parallel if the selected execution environment supports it, otherwise\n sequentially.\n\n ', '__init__': <function ExpRunner.__init__>, '__call__': <function ExpRunner.__call__>, '__dict__': <attribute '__dict__' of 'ExpRunner' objects>, '__weakref__': <attribute '__weakref__' of 'ExpRunner' objects>, '__annotations__': {}})
- __doc__ = '\n Execute each :term:`Experimental Run` in an :term:`Experiment`.\n\n In parallel if the selected execution environment supports it, otherwise\n sequentially.\n\n '
- __init__(cmdopts: Dict[str, Any], exec_times_fpath: Path, generator: ExpShellCmdsGenerator, shell: ExpShell) None [source]
- __module__ = 'sierra.core.pipeline.stage2.exp_runner'
- __weakref__
list of weak references to the object (if defined)
- class sierra.core.pipeline.stage2.exp_runner.ExpShell(exec_strict: bool)[source]
Launch a shell which persists across experimental runs.
Having a persistent shell is necessary so that running pre- and post-run shell commands have an effect on the actual commands to execute the run. If you set an environment variable before the simulator launches (for example), and then the shell containing that change exits, and the simulator launches in a new shell, then the configuration has no effect. Thus, a persistent shell.
Inheritance
- __dict__ = mappingproxy({'__module__': 'sierra.core.pipeline.stage2.exp_runner', '__doc__': 'Launch a shell which persists across experimental runs.\n\n Having a persistent shell is necessary so that running pre- and post-run\n shell commands have an effect on the actual commands to execute the run. If\n you set an environment variable before the simulator launches (for example),\n and then the shell containing that change exits, and the simulator launches\n in a new shell, then the configuration has no effect. Thus, a persistent\n shell.\n\n ', '__init__': <function ExpShell.__init__>, 'run_from_spec': <function ExpShell.run_from_spec>, '_update_env': <function ExpShell._update_env>, '__dict__': <attribute '__dict__' of 'ExpShell' objects>, '__weakref__': <attribute '__weakref__' of 'ExpShell' objects>, '__annotations__': {'procs': 'tp.List[subprocess.Popen]'}})
- __doc__ = 'Launch a shell which persists across experimental runs.\n\n Having a persistent shell is necessary so that running pre- and post-run\n shell commands have an effect on the actual commands to execute the run. If\n you set an environment variable before the simulator launches (for example),\n and then the shell containing that change exits, and the simulator launches\n in a new shell, then the configuration has no effect. Thus, a persistent\n shell.\n\n '
- __module__ = 'sierra.core.pipeline.stage2.exp_runner'
- __weakref__
list of weak references to the object (if defined)
- run_from_spec(spec: ShellCmdSpec) bool [source]