isi-vista / adam

Abduction to Demonstrate an Articulate Machine
MIT License
11 stars 3 forks source link

Refactor PerceptionGraph's _to_dot_graph chain to use node methods #1134

Closed lichtefeld closed 2 years ago

lichtefeld commented 2 years ago

No change needed, but this nested function confuses me. I thought we had a method on the nodes to compute the node label, so I'm sort of confused why we have this if-elif ladder.

_Originally posted by @spigo900 in https://github.com/isi-vista/adam/pull/1133#discussion_r879716429_

Located: https://github.com/isi-vista/adam/blob/master/adam/perception/perception_graph.py#L561

Nodes define a method to generate a label for a dot graph so its unclear why this elif ladder still exists.