mirror of
https://github.com/SillyTavern/SillyTavern-Extras.git
synced 2026-10-15 18:11:52 +00:00
[GH-ISSUE #97] Chromadb fix #63
Labels
No labels
bug
duplicate
planned
pull-request
under consideration
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
SillyTavern/SillyTavern-Extras#63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SpaceDuck41 on GitHub (Jul 31, 2023).
Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Extras/issues/97
For anyone having issue with the chromadb error, just change the code in the google collab ( under silero tts extras) related to chromadb(managed to fix it using chatgpt) to this one:
if (extras_enable_chromadb):
# Install the chromadb module
!pip install chromadb
@donlinglok1 commented on GitHub (Aug 1, 2023):
seems fixed in https://github.com/SillyTavern/SillyTavern-extras/commit/38b6403ca1bbe6da896975fafb0d2cdf1ee96198
@xNissX233 commented on GitHub (Aug 1, 2023):
I was able to run it but still have errors:
@Cohee1207 commented on GitHub (Aug 1, 2023):
@RBNXI
Why do your Extras interfere with Oobabooga install? How did you install extras?
@valden80 commented on GitHub (Aug 1, 2023):
I too getting error form chromaDB startup after the last update:
@xNissX233 commented on GitHub (Aug 1, 2023):
I installed it in the same conda than oobabooga, is that wrong?
@Cohee1207 commented on GitHub (Aug 1, 2023):
@RBNXI There would likely be problems with that. I suggest installing into a separate environment.
@valden80 Chroma broke reverse compatibility in their Python API. You need to update Chroma in your env:
pip install --upgrade chromadb@xNissX233 commented on GitHub (Aug 1, 2023):
I tried and I don't get the error anymore, but the character doesn't remember at all... I activated the extension, and I get logs of it working and the database file contains memories, but when I ask about those memories the character doesn't know, do I need more max tokens or what? (I know I have to restart for memories to load, tried and same result)
@Cohee1207 commented on GitHub (Aug 1, 2023):
What's your model and API?
@xNissX233 commented on GitHub (Aug 1, 2023):
So it depends on the model?
I use saigaggml-model-q5_1, and Llama.cpp in Oobabooga
@Cohee1207 commented on GitHub (Aug 1, 2023):
Exactly. The model can simply ignore what is being fed into it. Also, I don't know how good Chroma embeddings work with non-English languages (I see your model is not trained on English).
@xNissX233 commented on GitHub (Aug 1, 2023):
what model do you recommend?
@ghost commented on GitHub (Aug 1, 2023):
Thanks, this fixed chromadb's HttpClient-error I was having
@Wolf1030 commented on GitHub (Aug 3, 2023):
This resolved the issue for me. thanks
@EriIaz commented on GitHub (Aug 4, 2023):
Still fails. Now it gives me this error
Used to work well before the initial faulty change.
@Cohee1207 commented on GitHub (Aug 4, 2023):
Try removing your conda env and reinstalling. There may be a conflict in hnswlib previously installed via conda
@EriIaz commented on GitHub (Aug 4, 2023):
I've already did that before the original reply. Reinstalled the environment strictly following the guide, except for omitting cloning the SillyTavern-extras with git and I've also run pip install -r requirements-complete.txt at the end. Got the issue. Tried the same without the complete requirements, only chromadb, nltk and scikit-learn, run into the same issue.
@FitzWM commented on GitHub (Aug 6, 2023):
I'm getting the same bug when trying to run Extras with ChromaDB. It happens on both old env and on a brand new env, both with the version of chromadb installed by requirements-complete.txt and the version from upgrading it via pip. Given that parts of the install seem to be moving to Python 3.11 - and that the program itself now complains about wanting 3.11 when it is run - I'm not even 100% sure that the installation steps are actually correct anymore. But I don't know enough about Conda and Python to really have any idea.
@Cohee1207 commented on GitHub (Aug 6, 2023):
If you have troubles with local install - run Extras from colab
@FitzWM commented on GitHub (Aug 6, 2023):
What if I...don't want to do that? I run everything - SillyTavern, various backends, StableDiffusion and various frontends, PrivateGPT, etc. - locally, without any issue. Until the recent changes to ChromaDB, I did the same with SillyTavern-extras. I get that it's a community project, but the response to "the local install seems to be broken after an update, even following the official instructions" shouldn't be "use the remote version because it actually works."
@Cohee1207 commented on GitHub (Aug 6, 2023):
We didn't break chroma. They released an update that broke backward compatibility with existing installs. So we either do nothing at all and newer installs will not work or we update but those who pull and not do a reinstall will have it broken. It's a lose-lose situation with no resolution other than prompting everyone to reinstall their local chromadb.
@ghost commented on GitHub (Aug 6, 2023):
It's not complaining, it's recommending to use python 3.11. Python 3.10 works still currently, but most likely there will be a need to upgrade to the 3.11 in future.
I made fresh conda install just today and it runs fine if we ignore the python upgrade recommendation.
@ghost commented on GitHub (Aug 6, 2023):
I think it would be better to make everyone to reinstall if there is no other solution to this. It does sound like only solution to this issue, and I'm not sure if chromadb encrypts data or not.. but I'd rather not use colab where anyone with malicious intent basically could have access to the weird chats I'm having
@FitzWM commented on GitHub (Aug 6, 2023):
Can I ask how exactly you did this? I'm not doubting you, but I just followed the instructions on the main page a few minutes ago to make a completely new env, and I get the same error with that one. It's using Python 3.10 and the version of ChromaDB installed by requirements-complete.txt - although upgrading ChromaDB via pip doesn't help, either.
Edit: Or would I need to reinstall Conda altogether? My understanding was that Conda provided a virtual environment specifically so you didn't have to do that kind of thing, but my Python knowledge is...limited.
@ghost commented on GitHub (Aug 6, 2023):
I followed the guide too. But I installed miniconda for the first time today.
I would recommend clearing also your pips packages cache it has. Not sure how conda uses pip, but sometimes that helps when doing fresh install
@Cohee1207 commented on GitHub (Aug 6, 2023):
You tried this and it didn't help?
I tested on my older install in conda and it worked.
pip install --upgrade chromadb
@FitzWM commented on GitHub (Aug 7, 2023):
Sadly, no. I tried it both in my old env and in a brand-new one made using the instructions on the main page here. The only change I made was installing from requirements-complete.txt, rather than requirements.txt - since that's required for the chromadb module. It upgraded fine, but didn't stop the error messages.
@Cohee1207 commented on GitHub (Aug 7, 2023):
Try this if you installed hnswlib with conda previously:
@FitzWM commented on GitHub (Aug 7, 2023):
No joy, unfortunately. The remove command told me that hnswlib couldn't be found in the target environment, and the install command reported that chroma-hnswlib was already installed. Same thing with both my old env and my fresh one.
I'm honestly really confused, since creating a fresh new env should give me a completely clean slate, right? Meaning that, if it works for other people here, it should work for me. But that doesn't seem to be the case...
Edit: I also tried purging my pip cache after this, as well as reinstalling chroma-hnswlib with pip, but got the same error after both.
@Cohee1207 commented on GitHub (Aug 8, 2023):
@FitzWM can you show exactly what your exceptions look like?
@Cohee1207 commented on GitHub (Sep 3, 2023):
Cleaning up ChromaDB issues into one: https://github.com/SillyTavern/SillyTavern-Extras/issues/110