Skip to content

Commit

Permalink
Fix a bug that sometimes TraceGraph does not follow ordering.
Browse files Browse the repository at this point in the history
  • Loading branch information
chinganc authored Jan 14, 2025
1 parent 3636d7c commit 6c4c52d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions opto/trace/propagators/graph_propagator.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def init_feedback(self, node, feedback: Any):

def _propagate(self, child: MessageNode):
graph = [(p.level, p) for p in child.parents] # add the parents
graph = sorted(graph, key=lambda x: x[0]) # sort by level, heapq in TraceGraph requires this
feedback = self.aggregate(child.feedback) + TraceGraph(graph=graph, user_feedback=None)
assert isinstance(feedback, TraceGraph)

Expand Down

0 comments on commit 6c4c52d

Please sign in to comment.