Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'ragas.testset.evolutions' #1897

Open
sahlebrahim opened this issue Feb 2, 2025 · 1 comment
Open
Labels
bug Something isn't working module-testsetgen Module testset generation question Further information is requested

Comments

@sahlebrahim
Copy link

sahlebrahim commented Feb 2, 2025

im testing out ragas to generate questions but i keep getting this error when trying to implement the types of questions i want to generate

Code Examples

from ragas.testset.generator import TestsetGenerator
from ragas.testset.evolutions import simple, reasoning, multi_context

generator = TestsetGenerator.from_langchain(
    generator_llm=generator_llm,
    critic_llm=critic_llm,
    embeddings=ollama_emb
)

distribution = {simple: 0.5, reasoning: 0.25, multi_context: 0.25}
testset = generator.generate_with_langchain_docs(documents,
                                                 test_size=10,
                                                 distributions=distribution,
                                                 raise_exceptions=False)

gives error: ---------------------------------------------------------------------------

ModuleNotFoundError                       Traceback (most recent call last)
Cell In[16], line 3
      1 # ✅ Use Groq LLMs instead of Ollama
      2 from ragas.testset import TestsetGenerator
----> 3 from ragas.testset.evolutions import simple, reasoning, multi_context
      5 generator_llm = ChatGroq(model_name="gemma2-9b-it", api_key=groq_api_key)
      6 critic_llm = ChatGroq(model_name="llama3-8b-8192", api_key=groq_api_key)

ModuleNotFoundError: No module named 'ragas.testset.evolutions
@sahlebrahim sahlebrahim added the question Further information is requested label Feb 2, 2025
@dosubot dosubot bot added bug Something isn't working module-testsetgen Module testset generation labels Feb 2, 2025
@sahusiddharth
Copy link
Collaborator

Hi @sahlebrahim,

Could you let me know which version of the Ragas library you're using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module-testsetgen Module testset generation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants