Skip to content

Commit

Permalink
Fix CI failing
Browse files Browse the repository at this point in the history
  • Loading branch information
silvanocerza committed Apr 3, 2024
1 parent e642081 commit 4542897
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion haystack/components/evaluators/sas_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ def run(self, ground_truths_answers: List[str], predicted_answers: List[str]) ->
)

# Compute cosine-similarities
similarity_scores = [util.cos_sim(p, l).cpu() for p, l in zip(predictions_embeddings, label_embeddings)]
similarity_scores = [
util.cos_sim(p, l).cpu().numpy() for p, l in zip(predictions_embeddings, label_embeddings)
]

sas_score = np_mean(similarity_scores)

Expand Down

0 comments on commit 4542897

Please sign in to comment.