async def agenerate_dataset_from_nodes(self) -> LabelledRagDataset:
"""Generates questions for each document."""
return await self._agenerate_dataset(self.nodes, labelled=True)
def generate_dataset_from_nodes(self) -> LabelledRagDataset:
"""Generates questions for each document."""
return asyncio.run(self.agenerate_dataset_from_nodes())
asyncio.run(self.agenerate_dataset_from_nodes())
should be running the async function properly 🤔 This pattern is used in more than a few places