Skip to content

Conversation

maximaxft
Copy link

The current is not working, I got the error:
self._index.add_items(data=embeddings, ids=ids, num_threads=self.config.num_threads)
RuntimeError: The number of elements exceeds the specified limit
We need to multiply each element of the embedding list by their side (which is constant: self.embedding_dim) in the line 56 :
if self.size + len(embeddings)*self.embedding_dim >= self.max_size:

@liukidar
Copy link
Contributor

liukidar commented Apr 8, 2025

Mmmh, size, max_size and embeddings are all referring to each embedding vector as a single entity, so I am not sure multiplying by the embedding_dim is the right solution, instead, there may be a bug hiding somewhere else.

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