Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library.delete_installed_embedding(model_name, vector_db) modifies associated sqlite library record inconsistently #1094

Open
wissamharoun opened this issue Nov 5, 2024 · 1 comment

Comments

@wissamharoun
Copy link

wissamharoun commented Nov 5, 2024

environment: llmware v0.3.8, Apple Silicon macos 14.7, arm64, LLMWARE active_db set to sqlite, and vector_db set to chromadb

issue: after successfully installing embedding to an existing library

  • in the database, before a library has an embedding installed, on the library table, under embedding column initial value is:
    [{"embedding_status":` "no", "embedding_model": "none", "embedding_db": "none", "embedded_blocks": 0, "embedding_dims": 0, "time_stamp": "NA"}]

  • after successfully installing an embedding, in database -the library table updates embedding value as expected eg.:
    [{"embedding_status":` "yes", "embedding_model": "mini-lm-sbert", "embedding_db": "chromadb", "embedding_dims": 384, "embedded_blocks": 592, "time_stamp": "Mon Nov 4 14:18:37 2024"}]

  • thereafter, if embedding is deleted (programatically) using:
    Library.delete_installed_embedding(model_name, vector_db)
    in the database, library table, embedding column value is updated unexpectedly to:
    []
    with no content within the square brackets

attempting to install a new embedding on the associated library (even if same embedding dims) typically fails, whereas attempting to delete the same embedding that was just installed also fails. Manually repopulating the value in the db with the initial one... ie:
[{"embedding_status":` "no", "embedding_model": "none", "embedding_db": "none", "embedded_blocks": 0, "embedding_dims": 0, "time_stamp": "NA"}]

...is an effective but tedious workaround.

What is the correct and intended behavior of
Library.delete_installed_embedding(model_name, vector_db)

?

@doberst
Copy link
Contributor

doberst commented Nov 11, 2024

@wissamharoun - sorry you ran into this issue - really appreciate you sharing all of the environment details - very helpful - let me replicate the environment and re-run the exact steps. It does sound like you have found a bug in the code. Will revert in the next 24-48 hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants