Set max number of loops for renderer to avoid endless loop
@@ -36,7 +36,8 @@ class VariableRenderer:
# all the edges entering `end_vertices`
edges_to_render = self.local_graph.get_in_edges(end_vertices_indexes)
- while len(edges_to_render) > 0:
+ loops = 0
+ while len(edges_to_render) > 0 and loops < 50:
logging.info(f'evaluating {len(edges_to_render)} edges')
# group edges that have the same origin and label together
edges_groups = self.group_edges_by_origin_and_label(edges_to_render)
@@ -49,6 +50,7 @@ class VariableRenderer:
end_vertices_indexes = list(set([edge.origin for edge in edges_to_render]))
edges_to_render = self.local_graph.get_in_edges(end_vertices_indexes)
edges_to_render = [edge for edge in edges_to_render if edge not in self.done_edges]
+ loops += 1
self.local_graph.update_vertices_configs()
logging.info('done evaluating edges')
