-
Notifications
You must be signed in to change notification settings - Fork 813
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.generator' #1842
Comments
@dosu |
I found a similar closed issue regarding the error "ModuleNotFoundError: No module named 'ragas.testset'; 'ragas' is not a package" [1]. However, no solution was found in the comments of that issue. For Ragas version 0.2.10, the correct import paths for generating synthetic data are: from ragas.testset.generator import TestsetGenerator
from ragas.testset.evolutions import simple, reasoning, multi_context If you are still encountering the error, it might be worth checking if the module has been moved or renamed in recent versions, or if there are any issues with your installation of the Ragas package. Additionally, ensure that your Python environment is correctly set up and that the Ragas package is properly installed. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
I think there is some error with the documentation, ideally this should be more like
Try this, this should work with your
Maybe another issue can be raised for the documentation error |
@dosu What do you think? |
thanks a lot for helping out @Vidit-Ostwal 🙌🏽 |
Yes, for Ragas version 0.2.10, the correct import paths are indeed: from ragas.testset import TestsetGenerator
from ragas.testset import Testset, TestsetSample This is confirmed by the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
[ ] I have checked the documentation and related resources and couldn't resolve my bug.
Describe the bug
I want to generate synthetic data through RAG and evaluate the RAG using the synthentic data generated
Ragas version: 0.2.10
Python version: 3.13.1
Code to Reproduce
import ragas
from ragas.testset.generator import TestsetGenerator
from ragas.testset.evolutions import simple, reasoning, multi_context
generator with openai models
generator = TestsetGenerator.with_openai(critic_llm = "gpt-4")
Change resulting question type distribution
distributions = {
simple: 0.3,
multi_context: 0.2,
reasoning: 0.5
}
testset = generator.generate_with_langchain_docs(pages, 10, distributions)
testset.to_pandas()
Error trace
I am getting this error whenever i try to import the module. ModuleNotFoundError: No module named 'ragas.testset.generator'
The text was updated successfully, but these errors were encountered: