You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hey @SID262000 — I don't know what exactly is causing the issue here. Performing model.encode(sentences) (assuming sentences is a normal python list) should work — and it would output a numpy array, which allows us to do embeddings.shape as shown. Maybe there is something wrong with the sentences data type here?
Is this a new bug?
Current Behavior
The below line of code throws an error
Type Error expected ndarray for serialization
.Expected Behavior
We simply need to convert the model encoding to a list, which will resolve the above array.
Steps To Reproduce
Modify
embeddings = model.encode(sentences)
toembeddings = model.encode(sentences).tolist()
Relevant log output
No response
Environment
Additional Context
Here's the link to the page which references the above issue: https://www.pinecone.io/learn/series/nlp/dense-vector-embeddings-nlp/
I'm happy to work on this issue and update the documentation as well, feel free to assign it to me
The text was updated successfully, but these errors were encountered: