Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/extension/resnet'
Browse files Browse the repository at this point in the history
  • Loading branch information
eri24816 committed Apr 23, 2024
2 parents 89ac766 + ce8e37c commit dad276f
Show file tree
Hide file tree
Showing 3 changed files with 709 additions and 134 deletions.
9 changes: 8 additions & 1 deletion backend/src/grapycal/sobjects/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,14 @@ def create_edge(
) -> Edge:
# Check the tail and head have space for the edge
if tail.is_full() or head.is_full():
raise Exception("A port is full")
full_ports = []
if tail.is_full():
full_ports.append(f"tail({tail})")
if head.is_full():
full_ports.append(f"head({head})")
full_ports_str = ", ".join(full_ports) # Join descriptions of full ports
exception_detail = f"Edge from {tail!r} to {head!r} cannot be created because {full_ports_str} is full."
raise Exception(exception_detail)
return self.add_child(Edge, tail=tail, head=head, id=new_edge_id)

def create_edge_from_port_id(
Expand Down
Loading

0 comments on commit dad276f

Please sign in to comment.