-
Notifications
You must be signed in to change notification settings - Fork 23
little refactors #34
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
little refactors #34
Conversation
lesser context switching this way
"document": raw_models["documents"][i], | ||
} | ||
) | ||
model_embeddings = self.__collection.get(ids=model_ids) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does chroma_db.collection.get()
return if there are no documents with IDs that match your query?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it returns an empty GetResult object
class GetResult(TypedDict):
ids: List[ID]
embeddings: Optional[List[Embedding]]
documents: Optional[List[Document]]
uris: Optional[URIs]
data: Optional[Loadable]
metadatas: Optional[List[Metadata]]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does len(empty GetResult)
behave in this instance? Does the function still return an empty array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should i test it?
the only call to this function is in /client/pages/vector.py
:
with view_tab:
...
stored_models = vector_store.get_models()
...
and here we don't supply the parameter ids
, in which case chroma_db.Collection.get() is called with no arguments, and it returns all the models
Closing because the code has undergone major changes since this was created. |
No description provided.