cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
cancel
Showing results for 
Search instead for 
Did you mean: 

Issues running Chroma function from Dolly Demo

David_K93
Contributor

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.

image 

Any help would be greatly appreciated!

5 REPLIES 5

Anonymous
Not applicable

@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.

David_K93
Contributor

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:

image 

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

image 

similarity_search() source code:

image 

Thank you for any help.

Regards,

David

Axel_Schwanke
Contributor

got the same problem

image

ClementBM
New Contributor II

As written in the command output when pip installing the python packages, you should then run a `

dbutils.library.restartPython()`.
 
Please try the following commands:
  1. %pip install -U transformers langchain chromadb accelerate bitsandbytes
  2. dbutils.library.restartPython()

Kabbach
New Contributor II

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

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.