โ04-26-2023 12:36 PM
Hello,
I'm working through the Dolly demo that was released a few days ago. There are a few lines of code that I have had to alter in order to make it work in my environment. However, I've been trying to run similarity_search() on the generated Chroma database and can't work through an issue. I am triggering an error for an object name that I don't assign, but which the function seems to call. Please see the image below.
Any help would be greatly appreciated!
โ04-26-2023 10:22 PM
@David Kerseyโ :
Based on the one line of code provided, it feels like chromadb is not installed. There is a cell in the demo which will install it:%pip install -U transformers langchain chromadb accelerate bitsandbytes
%pip install -U transformers langchain chromadb accelerate bitsandbytes
If its still not due to this, then weโll need you to provide more information.
โ04-27-2023 06:02 AM
I apologize, it is my first time posting. Please allow me to provide more information.
I've been able to successfully create a Chroma DB following the demo. No issues with the installation you suggested above. I am also able to successfully load the DB as shown below:
The issue happens when I try to call a LangChain function like "similarity_search()". I get an error telling me the object name "chromadb" is not defined. There isn't an object named that in the code. I checked the source code and don't see an object by the name of 'chromadb' so I'm not sure why I am getting this error:
Error
similarity_search() source code:
Thank you for any help.
Regards,
David
โ04-28-2023 05:38 AM
โ09-03-2023 11:45 PM
As written in the command output when pip installing the python packages, you should then run a `
%pip install -U transformers langchain chromadb accelerate bitsandbytes
dbutils.library.restartPython()
โ01-16-2024 07:50 AM
Hi everyone,
Just had a similar issue, as a workaround I have added chromadb as a cluster library to be installed automatically every time the cluster is restarted.
Then it worked well.
You can do the same plus adding the other libraries to make sure all the required libraries are there when they are imported.
Regards,
Khaled Kabbach
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group