mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-05 11:27:15 +00:00
Fix gold_contexts_similarity for table retrieval evaluation (#2815)
* fix gold_contexts_similarity for table documents * check for type of gold_context
This commit is contained in:
parent
82df677ebf
commit
e6d8bcdf9b
@ -1453,8 +1453,8 @@ class Pipeline:
|
||||
df_docs["gold_contexts_similarity"] = df_docs.map_rows(
|
||||
lambda row: [
|
||||
calculate_context_similarity(
|
||||
gold_context,
|
||||
row["context"] or "",
|
||||
str(gold_context) if isinstance(gold_context, pd.DataFrame) else gold_context,
|
||||
str(row["context"]) if isinstance(row["context"], pd.DataFrame) else row["context"] or "",
|
||||
min_length=context_matching_min_length,
|
||||
boost_split_overlaps=context_matching_boost_split_overlaps,
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user