sierra.core.platform
Terminal interface for pltaform plugins.
Classes for generating the commands to run experiments on multiple platforms using multiple execution methods.
CmdlineParserGenerator
: Dispatcher to generate additional platform-dependent cmdline arguments.ExpRunShellCmdsGenerator
: Dispatcher for shell cmd generation for an Experimental Run.ExpShellCmdsGenerator
: Dispatcher for shell cmd generation for an Experiment.ParsedCmdlineConfigurer
: Dispatcher for configuring the cmdopts dictionary.ExecEnvChecker
: Base class for verifying execution environments before running experiments.
- class sierra.core.platform.CmdlineParserGenerator(platform: str)[source]
Dispatcher to generate additional platform-dependent cmdline arguments.
Inheritance
- __call__() ArgumentParser [source]
Call self as a function.
- __dict__ = mappingproxy({'__module__': 'sierra.core.platform', '__doc__': '\n Dispatcher to generate additional platform-dependent cmdline arguments.\n ', '__init__': <function CmdlineParserGenerator.__init__>, '__call__': <function CmdlineParserGenerator.__call__>, '__dict__': <attribute '__dict__' of 'CmdlineParserGenerator' objects>, '__weakref__': <attribute '__weakref__' of 'CmdlineParserGenerator' objects>, '__annotations__': {}})
- __doc__ = '\n Dispatcher to generate additional platform-dependent cmdline arguments.\n '
- __module__ = 'sierra.core.platform'
- __weakref__
list of weak references to the object (if defined)
- class sierra.core.platform.ExpRunShellCmdsGenerator(cmdopts: Dict[str, Any], criteria: BatchCriteria, n_robots: int, exp_num: int)[source]
Dispatcher for shell cmd generation for an Experimental Run.
Dispatches generation to the selected platform and execution environment. Called during stage 1 to add shell commands which should be run immediately before and after the shell command to actually execute a single Experimental Run to the commands file to be fed to whatever the tool a given execution environment environment uses to run cmds (e.g., GNU parallel).
Inheritance
- __dict__ = mappingproxy({'__module__': 'sierra.core.platform', '__doc__': 'Dispatcher for shell cmd generation for an :term:`Experimental Run`.\n\n Dispatches generation to the selected platform and execution environment.\n Called during stage 1 to add shell commands which should be run immediately\n before and after the shell command to actually execute a single\n :term:`Experimental Run` to the commands file to be fed to whatever the tool\n a given execution environment environment uses to run cmds (e.g., GNU\n parallel).\n\n ', '__init__': <function ExpRunShellCmdsGenerator.__init__>, 'pre_run_cmds': <function ExpRunShellCmdsGenerator.pre_run_cmds>, 'exec_run_cmds': <function ExpRunShellCmdsGenerator.exec_run_cmds>, 'post_run_cmds': <function ExpRunShellCmdsGenerator.post_run_cmds>, '__dict__': <attribute '__dict__' of 'ExpRunShellCmdsGenerator' objects>, '__weakref__': <attribute '__weakref__' of 'ExpRunShellCmdsGenerator' objects>, '__annotations__': {}})
- __doc__ = 'Dispatcher for shell cmd generation for an :term:`Experimental Run`.\n\n Dispatches generation to the selected platform and execution environment.\n Called during stage 1 to add shell commands which should be run immediately\n before and after the shell command to actually execute a single\n :term:`Experimental Run` to the commands file to be fed to whatever the tool\n a given execution environment environment uses to run cmds (e.g., GNU\n parallel).\n\n '
- __init__(cmdopts: Dict[str, Any], criteria: BatchCriteria, n_robots: int, exp_num: int) None [source]
- __module__ = 'sierra.core.platform'
- __weakref__
list of weak references to the object (if defined)
- post_run_cmds(host: str) List[ShellCmdSpec] [source]
- class sierra.core.platform.ExpShellCmdsGenerator(cmdopts: Dict[str, Any], exp_num: int)[source]
Dispatcher for shell cmd generation for an Experiment.
Dispatches generation to the selected platform and execution environment. Called during stage 2 to run shell commands immediately before running a given Experiment, to run shell commands to actually run the experiment, and to run shell commands immediately after the experiment finishes.
Inheritance
- __dict__ = mappingproxy({'__module__': 'sierra.core.platform', '__doc__': 'Dispatcher for shell cmd generation for an :term:`Experiment`.\n\n Dispatches generation to the selected platform and execution environment.\n Called during stage 2 to run shell commands immediately before running a\n given :term:`Experiment`, to run shell commands to actually run the\n experiment, and to run shell commands immediately after the experiment\n finishes.\n\n ', '__init__': <function ExpShellCmdsGenerator.__init__>, 'pre_exp_cmds': <function ExpShellCmdsGenerator.pre_exp_cmds>, 'exec_exp_cmds': <function ExpShellCmdsGenerator.exec_exp_cmds>, 'post_exp_cmds': <function ExpShellCmdsGenerator.post_exp_cmds>, '__dict__': <attribute '__dict__' of 'ExpShellCmdsGenerator' objects>, '__weakref__': <attribute '__weakref__' of 'ExpShellCmdsGenerator' objects>, '__annotations__': {}})
- __doc__ = 'Dispatcher for shell cmd generation for an :term:`Experiment`.\n\n Dispatches generation to the selected platform and execution environment.\n Called during stage 2 to run shell commands immediately before running a\n given :term:`Experiment`, to run shell commands to actually run the\n experiment, and to run shell commands immediately after the experiment\n finishes.\n\n '
- __module__ = 'sierra.core.platform'
- __weakref__
list of weak references to the object (if defined)
- post_exp_cmds() List[ShellCmdSpec] [source]
- pre_exp_cmds() List[ShellCmdSpec] [source]
- class sierra.core.platform.ParsedCmdlineConfigurer(platform: str, exec_env: str)[source]
Dispatcher for configuring the cmdopts dictionary.
Dispatches configuring to the selected platform and execution environment. Called before the pipeline starts to add new/modify existing cmdline arguments after initial parsing.
Inheritance
- __dict__ = mappingproxy({'__module__': 'sierra.core.platform', '__doc__': 'Dispatcher for configuring the cmdopts dictionary.\n\n Dispatches configuring to the selected platform and execution environment.\n Called before the pipeline starts to add new/modify existing cmdline\n arguments after initial parsing.\n\n ', '__init__': <function ParsedCmdlineConfigurer.__init__>, '__call__': <function ParsedCmdlineConfigurer.__call__>, '__dict__': <attribute '__dict__' of 'ParsedCmdlineConfigurer' objects>, '__weakref__': <attribute '__weakref__' of 'ParsedCmdlineConfigurer' objects>, '__annotations__': {}})
- __doc__ = 'Dispatcher for configuring the cmdopts dictionary.\n\n Dispatches configuring to the selected platform and execution environment.\n Called before the pipeline starts to add new/modify existing cmdline\n arguments after initial parsing.\n\n '
- __module__ = 'sierra.core.platform'
- __weakref__
list of weak references to the object (if defined)
- class sierra.core.platform.ExecEnvChecker(cmdopts: Dict[str, Any])[source]
Base class for verifying execution environments before running experiments.
Platforms and/or execution environments needed to perform verification should derive from this class to use the common functionality present in it.
Inheritance
- __dict__ = mappingproxy({'__module__': 'sierra.core.platform', '__doc__': 'Base class for verifying execution environments before running experiments.\n\n Platforms and/or execution environments needed to perform verification\n should derive from this class to use the common functionality present in it.\n\n ', 'parse_nodefile': <staticmethod object>, '_parse_nodefile_line': <staticmethod object>, '__init__': <function ExecEnvChecker.__init__>, '__call__': <function ExecEnvChecker.__call__>, 'check_connectivity': <function ExecEnvChecker.check_connectivity>, 'check_for_simulator': <function ExecEnvChecker.check_for_simulator>, '__dict__': <attribute '__dict__' of 'ExecEnvChecker' objects>, '__weakref__': <attribute '__weakref__' of 'ExecEnvChecker' objects>, '__annotations__': {}})
- __doc__ = 'Base class for verifying execution environments before running experiments.\n\n Platforms and/or execution environments needed to perform verification\n should derive from this class to use the common functionality present in it.\n\n '
- __module__ = 'sierra.core.platform'
- __weakref__
list of weak references to the object (if defined)
- static _parse_nodefile_line(line: str) Optional[ParsedNodefileSpec] [source]
- static parse_nodefile(nodefile: str) List[ParsedNodefileSpec] [source]