Skip to content

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

@wissamharoun

Description

@wissamharoun

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)

?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions