fix: use correct count of outgoing edges in RayPipeline (#4066)

This commit is contained in:
Zoltan Fedor 2023-02-06 04:52:32 -05:00 committed by GitHub
parent d819d6badf
commit f4a30a552a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -251,7 +251,7 @@ class RayPipeline(Pipeline):
if "." in i:
[input_node_name, input_edge_name] = i.split(".")
assert "output_" in input_edge_name, f"'{input_edge_name}' is not a valid edge name."
outgoing_edges_input_node = self.graph.nodes[input_node_name]["component"].outgoing_edges
outgoing_edges_input_node = self.graph.nodes[input_node_name]["outgoing_edges"]
assert int(input_edge_name.split("_")[1]) <= outgoing_edges_input_node, (
f"Cannot connect '{input_edge_name}' from '{input_node_name}' as it only has "
f"{outgoing_edges_input_node} outgoing edge(s)."