-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
bugSomething isn't workingSomething isn't workingmodule-testsetgenModule testset generationModule testset generation
Description
π¨ Bug Report: progress is stuck (or maybe too long) for generate_with_langchain_docs
- I have checked the documentation and related resources and couldn't resolve my bug.
π Describe the bug
The execution of generate_with_langchain_docs() is stuck at 50% with no progress for over an hour. No error is thrown, and CPU usage is minimal. It seems like the generation process either hangs or is too long for practical usage.
π Python version
Python 3.132.2
π» Ragas version
Ragas 0.3.0
π Code to Reproduce
from ragas.testset import TestsetGenerator
from pandas import DataFrame, concat
from PDF_load.pdf_loader import get_content
from LLM.settings import generator_llm, generator_embeddings
import pathlib
import asyncio
# Load PDF content
docs = get_content()
# Create generator
generator = TestsetGenerator(
llm=generator_llm, embedding_model=generator_embeddings
)
output_dir = pathlib.Path("Output")
output_dir.mkdir(exist_ok=True)
async def run():
docs = get_content()
for item in docs:
file_name = item.get("file_name")
doc = item.get("doc")
dataset = generator.generate_with_langchain_docs(doc, testset_size=10)
df = dataset.to_pandas()
output_path = output_dir / f"{file_name.split('.')[0]}.csv"
df.to_csv(output_path, index=False)
asyncio.run(run())Generating Scenarios: 50%|ββββββββββββββββ | 1/2 [27:14<27:14, 1634.71s/it]
dosubot
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingmodule-testsetgenModule testset generationModule testset generation