Skip to content

Commit

Permalink
fix: Sockets named "text/plain" or containing a "/" fail during pipel…
Browse files Browse the repository at this point in the history
…ine.to_dict (#131)

* don't split sockets by /

* revert hashing edge keys
  • Loading branch information
julian-risch authored Oct 13, 2023
1 parent 2971b4d commit 8abc14d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions canals/pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ def to_dict(self) -> Dict[str, Any]:
components[name] = component_to_dict(instance)

connections = []
for sender, receiver, sockets in self.graph.edges:
(sender_socket, receiver_socket) = sockets.split("/")
for sender, receiver, edge_data in self.graph.edges.data():
sender_socket = edge_data["from_socket"].name
receiver_socket = edge_data["to_socket"].name
connections.append(
{
"sender": f"{sender}.{sender_socket}",
Expand Down

0 comments on commit 8abc14d

Please sign in to comment.