You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[x] I have checked the documentation and related resources and couldn't resolve my bug.
Describe the bug
Unable to instantiate HuggingfaceEmbeddings, because it doesn't implement asynchronous embed methods of base BaseRagasEmbeddings class.
Ragas version: 0.2.9
Python version: 3.12.8
Code to Reproduce
Code is taken from the docs basically.
fromragas.dataset_schemaimportSingleTurnSamplefromragas.embeddingsimportHuggingfaceEmbeddingsfromragas.metricsimportSemanticSimilaritysample=SingleTurnSample(
response="The Eiffel Tower is located in Paris.",
reference="The Eiffel Tower is located in Paris. I has a height of 1000ft."
)
ragas_embeddings=HuggingfaceEmbeddings(model_name="BAAI/bge-reranker-v2-m3")
scorer=SemanticSimilarity(embeddings=ragas_embeddings, is_cross_encoder=True)
awaitscorer.single_turn_ascore(sample)
Error trace
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
File /home/magnesium/sadaivault/prrag/kilt_eval.py:[1](https://file+.vscode-resource.vscode-cdn.net/home/magnesium/sadaivault/prrag/kilt_eval.py:1)
----> 1 ragas_embeddings = HuggingfaceEmbeddings(model_name="BAAI/bge-reranker-v2-m3")
TypeError: Can't instantiate abstract class HuggingfaceEmbeddings without an implementation for abstract methods 'aembed_documents', 'aembed_query'
Expected behavior
I expected the object to be instantiated and functional.
The text was updated successfully, but these errors were encountered:
[x] I have checked the documentation and related resources and couldn't resolve my bug.
Describe the bug
Unable to instantiate
HuggingfaceEmbeddings
, because it doesn't implement asynchronous embed methods of baseBaseRagasEmbeddings
class.Ragas version: 0.2.9
Python version: 3.12.8
Code to Reproduce
Code is taken from the docs basically.
Error trace
Expected behavior
I expected the object to be instantiated and functional.
The text was updated successfully, but these errors were encountered: