Skip to content

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

Closed
wants to merge 6 commits into from
Closed

little refactors #34

wants to merge 6 commits into from

Conversation

codeblech
Copy link
Collaborator

No description provided.

@codeblech codeblech requested a review from pragunbhutani as a code owner June 27, 2024 17:12
"document": raw_models["documents"][i],
}
)
model_embeddings = self.__collection.get(ids=model_ids)
Copy link
Owner

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?

Copy link
Collaborator Author

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]]

Copy link
Owner

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?

Copy link
Collaborator Author

@codeblech codeblech Jul 3, 2024

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

@pragunbhutani
Copy link
Owner

Closing because the code has undergone major changes since this was created.

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

Successfully merging this pull request may close these issues.

2 participants