Replies: 2 comments 4 replies
-
🤖 Hey @saswat0! It's good to see you again. Hope you're doing well. Let's dive right into your issue! Based on the information provided, it seems like you're trying to use the Here's how you can use the import asyncio
# Assuming `queries` is your list of queries and `ensemble_retriever` is an instance of EnsembleRetriever
async def process_queries(queries, ensemble_retriever):
tasks = [ensemble_retriever.ainvoke(query) for query in queries]
results = await asyncio.gather(*tasks)
return results
# Run the async function
loop = asyncio.get_event_loop()
results = loop.run_until_complete(process_queries(queries, ensemble_retriever)) In this example, Please note that the actual implementation may vary depending on the structure of your dataset and how you want to handle the results. You can find more information about the I hope this helps! If you have any other questions or need further clarification, feel free to ask. SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
do you resolve this problem? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
How can EnsembleRetriever be called asynchronously? I have a dataset with ~1k questions and I wish to find the documents that can best answer each of them in parallel. However, calling it sequentially takes a lot of time. Can I run the retriever in parallel for all rows? Or is there a different way to optimise the run times?
I'm calling it like this now but it gives out a segmentation fault after getting stuck for an hour
Related issue
Beta Was this translation helpful? Give feedback.
All reactions