chroma
chroma copied to clipboard
[Bug]: Chroma does not validate that array lengths are > 0, throws unintuitive error
What happened?
i wrote code that inadvertently resultent in trying to .add() an empty array, which then resulted in an unintuitive error IndexError: list index out of range that was hard to track down.

@HammadB said we should file a bug and validate the thing
Versions
latest
Relevant log output
No response
handling it is a question of user experience - imo we should not add anything, but also not error, just log a warning
Similar to a refactor on the testing suite, think it is wise to refactor the API interface. You have to start with the developer experience (The API) and work backwards.
Bear with me, We don't know what is outside consciousness, but we get an interface that is really simple! We are an object in space with 3 dimensions and 3 axis of movement. This simple interface lets us do more. Similarly, a simple interface will let the developer do more.
And all things considered, I do think data is like points in embedding space like real space. But this space has unique properties. The simpler this interface becomes, the higher the chance that a Newton can come along and reveal something that lets people do even more with their data in the embedding space.
You have to create an environment where things like that can occur. The creators of Chroma are the most educated people on databases. And you are trying to communicate complicated things through internet cables and a computer interface. It is hard. The API interface itself should become the teaching tool by representing a simple and intuitive model that comes easily to developers.
Closed by #577