chroma icon indicating copy to clipboard operation
chroma copied to clipboard

home dir is hardcoded in class ONNXMiniLM_L6_V2(EmbeddingFunction[Documents]): [Bug]:

Open GonyRosenman opened this issue 1 year ago • 4 comments

What happened?

i'm trying to add documents to a collection, using an embedding model. as far as i understand, the collection first creates an instance of this model and tries to save it in a cache directory. instead of having a way to control the cache directory- it simply uses pathlib Path.home()

in my case, the home directory is full and that causes the code to crash.

the only way i can run the code is by modifying the home directory before running the script.

bug location: site-packages\chromadb\utils\embedding_functions.py

class ONNXMiniLM_L6_V2(EmbeddingFunction[Documents]): MODEL_NAME = "all-MiniLM-L6-v2" DOWNLOAD_PATH = Path.home() / ".cache" / "chroma" / "onnx_models" / MODEL_NAME EXTRACTED_FOLDER_NAME = "onnx" ARCHIVE_FILENAME = "onnx.tar.gz" MODEL_DOWNLOAD_URL = ( "https://chroma-onnx-models.s3.amazonaws.com/all-MiniLM-L6-v2/onnx.tar.gz" ) _MODEL_SHA256 = "913d7300ceae3b2dbc2c50d1de4baacab4be7b9380491c27fab7418616a16ec3"

Versions

chromadb==0.4.24

Relevant log output

No response

GonyRosenman avatar Apr 02 '24 18:04 GonyRosenman

@GonyRosenman, have a look at this PR - https://github.com/chroma-core/chroma/pull/1799

tazarov avatar Apr 02 '24 18:04 tazarov

does this mean that its in progress and to be patient?

GonyRosenman avatar Apr 02 '24 19:04 GonyRosenman

We can prioritize this for our next release. @tazarov would you mind TAL at the PR in question?

HammadB avatar Apr 02 '24 22:04 HammadB

Any progress on this?

Clarification we are unable to write to home as it is a RO file system. Would like to be able to use this without monkey patching ONNXMiniLM_L6_V2.DOWNLOAD_PATH = PATCHED_DIRPATH_OBJ

jessekrubin avatar Aug 19 '24 20:08 jessekrubin

Any update on this?

jjones203 avatar Aug 28 '25 18:08 jjones203