Skip to content

Commit

Permalink
Ragas fix for use of metrics argument (#177)
Browse files Browse the repository at this point in the history
* small fix for ragas.py

Signed-off-by: aasavari <aasavari.dhananjay.kakne@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed error when metrics arg is used

Signed-off-by: aasavari <aasavari.dhananjay.kakne@intel.com>

---------

Signed-off-by: aasavari <aasavari.dhananjay.kakne@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
adkakne and pre-commit-ci[bot] authored Oct 25, 2024
1 parent 99ef325 commit 0cf3631
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion evals/metrics/ragas/ragas.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def measure(self, test_case: Dict):
else:
if metric == "AnswerRelevancy" and self.embeddings is None:
raise ValueError("AnswerRelevancy metric need provide embeddings model.")
tmp_metrics.append(self.metrics_instances[metric])
tmp_metrics.append(self.metric_instances[metric])
self.metrics = tmp_metrics
else:
self.metrics = list(self.metric_instances.values())
Expand Down

0 comments on commit 0cf3631

Please sign in to comment.