Find answers from the community

E
Eliott
Offline, last seen 3 months ago
Joined September 25, 2024
E
Eliott
·

Hello

Hello
i'm trying to use the pack called HybridFusionRetrieverPack but i'm getting this error RuntimeError: asyncio.run() cannot be called from a running event loop
Did someone succeeded at making it work ? Bellow is a small piece of code to reproduce the error.


Plain Text
from llama_index import SimpleDirectoryReader
from llama_index.node_parser import SimpleNodeParser

# load in some sample data
reader = SimpleDirectoryReader(input_files=["paul_graham_essay.txt"])
documents = reader.load_data()

# parse nodes
node_parser = SimpleNodeParser.from_defaults()
nodes_test = node_parser.get_nodes_from_documents(documents)

hybrid_fusion_pack_test = HybridFusionRetrieverPack(
    nodes, chunk_size=256, vector_similarity_top_k=2, bm25_similarity_top_k=2
)

response = hybrid_fusion_pack.run("What did the author do during his time in YC?")



--> RuntimeError: asyncio.run() cannot be called from a running event loop

Thank you 🙂
1 comment
W
Hello,
After i finetune my embedding model, do you know how can i save it locally ?
i'm using SentenceTransformersFinetuneEngine to finetune it.
Thanks in advance
5 comments
E
W