Branchprocess¶
- class caliber.BranchProcess(branches: int, name: str | None = None, tasks: List | None = None)[source]¶
A process which can be part of another process and which can be used to run variants of the defined tasks.
- Parameters:
name (str) – The name of the BranchProcess.
tasks (list) – The tasks in the BranchProcess.
branches (int) – The number of branches. Note that the number of branches must be less than or equal to the number of sets of args and kwargs passed to the tasks.
- to_json(out_file: str | TextIO) None[source]¶
Export to a json-file.
- Parameters:
out_file (str or file-like object) – The file to write to.
- static from_json(infile: str) BranchProcess | None[source]¶
Initiate a BranchProcess from a json file.
- Parameters:
infile (str) – The name of the json file.