espnet3.bin.atlas.core.models.ResearchGraph
Less than 1 minute
espnet3.bin.atlas.core.models.ResearchGraph
class espnet3.bin.atlas.core.models.ResearchGraph(name: str, version: int, start: str, nodes: dict[str, NodeConfig])
Bases: object
A study’s static stage graph, as loaded from graph.yaml.
- Parameters:
- name – Graph’s declared name.
- version – Graph schema version.
- start – Name of the first node to run for a new study.
- nodes – Mapping of node name to its
NodeConfig.
name : str
nodes : dict[str, NodeConfig]
route(node_name: str, status: str) → str | None
Return the next node’s name for a stage result, or None if terminal.
- Parameters:
- node_name – Node that just ran.
- status – The stage result’s
statusvalue (e.g."success").
- Returns: The next node’s name from
node_name’sonmapping, orNoneif the node isterminal. - Return type: str | None
- Raises:AtlasError – If the node is not terminal and
statushas no entry in itsonmapping.
Example
>>> graph.route("collect_result", "success")
'accept_or_reject'start : str
version : int
