def get_conditions(self) -> List[AbstractCondition]:
conditions = []
added_conditions = set() # type: Set[str]
# Nodes is a list of nodes
for source_node in self.get_hyperparameters():
# This is a list of keys in a dictionary
# TODO sort the edges by the order of their source_node in the
# hyperparameter list!
for target_node in self._children[source_node.name]:
if target_node not in added_conditions:
condition = self._children[source_node.name][target_node]
conditions.append(condition)
added_conditions.add(target_node)
return conditions
评论列表
文章目录