cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
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

Connect with Databricks Users in Your Area

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