I am trying to run the L4 notebook in Google Colab.
I have installed the required packages and their dependencies using the following commands:
!pip install openai
!pip install llama-index
!pip install trulens_eval
!pip install sentence_transformers
However, when I run the following line:
auto_merging_response = auto_merging_engine.query(
“What is the importance of networking in AI?”
)
It keeps throwing the following error:
AttributeError Traceback (most recent call last)
in <cell line: 1>()
----> 1 auto_merging_response = auto_merging_engine.query(
2 “What is the importance of networking in AI?”
3 )
5 frames
/usr/local/lib/python3.10/dist-packages/llama_index/postprocessor/sbert_rerank.py in _postprocess_nodes(self, nodes, query_bundle)
76
77 for node, score in zip(nodes, scores):
—> 78 if self.keep_retrieval_score:
79 # keep the retrieval score in metadata
80 node.node.metadata[“retrieval_score”] = node.score AttributeError: ‘SentenceTransformerRerank’ object has no attribute ‘keep_retrieval_score’
What I have tried:
I tried to find out whether there were any specific version dependencies but I could not get that information anywhere.
I googled for this error, there were no links that were of any use.
Since LLM is a new field, all the related libraries get updated frequently. From the error you are getting, it seems like the same happened here.
You can do pip freeze in any one notebook on the platform and see what package versions are being used there for openai, llama-index, trulens_eval and sentence_transformers.
Then you can install those same packages in the colab and try again.