Skip to content

Commit

Permalink
fix: patch type issue in evolution parsing (#980)
Browse files Browse the repository at this point in the history
fixes: #900
  • Loading branch information
shahules786 authored May 21, 2024
1 parent 8d658a1 commit 54e9f4d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ragas/testset/evolutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,13 @@ async def generate_datarow(
if isinstance(relevant_contexts_result, dict)
else None
)
if relevant_context_indices is None:

if relevant_context_indices is not None:
relevant_context_indices = [
idx for idx in relevant_context_indices if isinstance(idx, int)
]

if relevant_context_indices is None or not relevant_context_indices:
relevant_context = CurrentNodes(
root_node=current_nodes.root_node, nodes=current_nodes.nodes
)
Expand Down

0 comments on commit 54e9f4d

Please sign in to comment.