sierra.core.root_dirpath_generator

Functions for generating root directory paths for a batch experiment.

  • The batch experiment root. ALL files (inputs and outputs) are written to this directory, which will be under --sierra-root. Named using a combination of --scenario (block distribution + arena dimensions) and --batch-criteria in order to guarantee uniqueness among batch roots anytime the batch criteria or scenario change.

  • The batch input root. All input files will be generated under this root directory. Named <batch experiment root>/exp-inputs.

  • The batch output root. All output files will accrue under this root directory. Each experiment will get their own directory in this root for its outputs to accrue into. Named <batch experiment root>/exp-outputs.

  • The batch graph root. All generated graphs will acrrue under this root directory. Each experiment will get their own directory in this root for their graphs to accrue into. Named <batch experiment root>/graphs.

  • The batch model root. All model outputs will accrue under this root directory. Each experiment will get their own directory in this root for their model outputs to accrue into. Named <batch experiment root>/models.

  • The batch statistics root. All statistics generated during stage 3 will accrue under this root directory. Each experiment will get their own directory in this root for their statistics. Named <batch experiment root>/statistics.

  • The batch imagizing root. All images generated during stage 3 will accrue under this root directory. Each experiment will get their own directory in this root for their images. Named <batch experiment root>/images.

  • The batch video root. All videos rendered during stage 4 will accrue under this root directory. Each experiment will get their own directory in this root for their videos. Named <batch experiment root>/videos.

  • The batch scratch root. All GNU parallel outputs, --exec-env artifacts will appear under here. Each experiment will get their own directory in this root for their own scratch. This root is separate from experiment inputs to make checking for segfaults, tar-ing experiments, etc. easier. Named <batch experiment root>/scratch.

sierra.core.root_dirpath_generator.from_cmdline(args: Namespace) Dict[str, Path][source]

Generate directory paths directly from cmdline arguments.

sierra.core.root_dirpath_generator.regen_from_exp(sierra_rpath: str, project: str, batch_leaf: str, controller: str) Dict[str, Path][source]

Regenerate directory paths from a previously created batch experiment.

Parameters:
  • sierra_rpath – The path to the root directory where SIERRA should store everything.

  • project – The name of the project plugin used.

  • criteria – List of strings from the cmdline specification of the batch criteria.

  • batch_root – The name of the directory that will be the root of the batch experiment (not including its parent).

  • controller – The name of the controller used.

sierra.core.root_dirpath_generator.parse_batch_leaf(root: str) Tuple[str, str, List[str]][source]

Parse a batch root (dirpath leaf).

Parsed into (template input file basename, scenario, batch criteria list) string components as they would have been specified on the cmdline.

sierra.core.root_dirpath_generator.gen_batch_root(root: str, project: str, criteria: List[str], scenario: str, controller: str, template_stem: str) Path[source]

Generate the directory path for the batch root directory.

The directory path depends on all of the input arguments to this function, and if ANY of the arguments change, so will the generated path.

Batch root is: <sierra_root>/<project>/<template_basename>-<scenario>+<criteria0>+<criteria1>

Parameters:
  • root – The path to the root directory where SIERRA should store everything.

  • project – The name of the project plugin used.

  • criteria – List of strings from the cmdline specification of the batch criteria.

  • scenario – The cmdline specification of --scenario

  • batch_root – The name of the directory that will be the root of the batch experiment (not including its parent).

  • controller – The name of the controller used.