Skip to content

Commit c760386

Browse files
chore(format): format testset synthesizers
1 parent a782c2f commit c760386

File tree

1 file changed

+6
-2
lines changed
  • ragas/src/ragas/testset/synthesizers/multi_hop

1 file changed

+6
-2
lines changed

ragas/src/ragas/testset/synthesizers/multi_hop/abstract.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ class MultiHopAbstractQuerySynthesizer(MultiHopQuerySynthesizer):
4242
def get_node_clusters(self, knowledge_graph: KnowledgeGraph) -> t.List[t.Set[Node]]:
4343
"""Identify clusters of nodes based on the specified relationship condition."""
4444
node_clusters = knowledge_graph.find_indirect_clusters(
45-
relationship_condition=lambda rel: bool(rel.get_property(self.relation_property)),
45+
relationship_condition=lambda rel: bool(
46+
rel.get_property(self.relation_property)
47+
),
4648
depth_limit=3,
4749
)
4850
logger.info("found %d clusters", len(node_clusters))
@@ -89,7 +91,9 @@ async def _generate_scenarios(
8991
nodes.append(node)
9092

9193
base_scenarios = []
92-
node_themes = [node.properties.get(self.abstract_property_name, []) for node in nodes]
94+
node_themes = [
95+
node.properties.get(self.abstract_property_name, []) for node in nodes
96+
]
9397
prompt_input = ConceptsList(
9498
lists_of_concepts=node_themes, max_combinations=num_sample_per_cluster
9599
)

0 commit comments

Comments
 (0)