Questions tagged [annoy]
21 questions
5
votes
1 answer
Share RAM between Docker containers using mmap() in Annoy library
I am using Annoy library that is using mmap() to load some multi-Gb files into RAM memory. The goal of using mmap() is to load the file only once in memory even when different processes need it.
Using docker, I plan to scale with multiple containers…

Robycool
- 1,104
- 2
- 14
- 26
2
votes
0 answers
How does Annoy Index the embeddings?
I am trying to understand how Annoy Indexing works..I have referred the following…

Chaitanya Patil
- 183
- 2
- 16
2
votes
1 answer
How to resolve error while installing annoy using pip?
I have python 3.8 on my system.
I am trying to install Annoy using pip install annoy.
But I am getting the following error:
ERROR: Command errored out with exit status 1:
command: 'D:\Anaconda\envs\tensorflow_env\python.exe' -u -c 'import sys,…

FaizanHassan
- 41
- 5
1
vote
0 answers
AnnoyIndex(length, 'angular') from annoy library python returns euclidean distance instead of angular
I am trying to implement the ANNOY library in python. I have the following code, which runs fine:
from annoy import AnnoyIndex
class GeneratorAnnoy:
def __init__(self, vector_dict: dict):
self.vector_dict = vector_dict
…

MisterJAcobz
- 85
- 6
1
vote
0 answers
Jupyter notebook's annoying grey text auto-show
After running a cell, that cell will show gray texts; if I click on the cell, they will disappear. Anyone ever encounter something like this before?
[enter image description here](https://i.stack.imgur.com/BFHF8.png)
This is really annoying, If…

Teachme199
- 11
- 1
1
vote
2 answers
cannot install annoy wheel
I have been trying to install the python package annoy but it always gives an error, I have tried different methods but they don't work.
I have even tried to install the module manually but it does not work either
My Code:
pip install…

Odysseus
- 53
- 1
- 7
1
vote
0 answers
how to reduce time complexity of clustering over doc2vec embedding?
I have a bunch of vectors of 300 dimensions each, as part of doc2vec embedding. Each vector is a representation of an article. My goal is to discard the duplicate articles. I was thinking of running DBSCAN clustering over my dataset, and then for…

Bitswazsky
- 4,242
- 3
- 29
- 58
1
vote
1 answer
Using annoy with Torchtext for nearest neighbor search
I'm using Torchtext for some NLP tasks, specifically using the built-in embeddings.
I want to be able to do a inverse vector search: Generate a noisy vector, find the vector that is closest to it, then get back the word that is "closest" to the…

Bar
- 2,736
- 3
- 33
- 41
1
vote
1 answer
error: command 'gcc' failed with exit status 1 fatal error: 'vector' file not found
I ran pip install annoy and got the following error:
Collecting annoy
Using cached https://files.pythonhosted.org/packages/b5/28/f8ce7400344090bb5cfa1c9fae3fdb03b9438db082d458686442633d82a3/annoy-1.15.0.tar.gz
Building wheels for collected…

Michael Sun
- 189
- 3
- 10
1
vote
1 answer
Understanding the most_similar method for an AnnoyIndexer in gensim.similarities.index
So I have made an AnnoyIndexer and am running some most_similar queries to find the nearest neighbours of some vectors in a 300dimensional vector space. This is the code for it:
def most_similar(self, vector, num_neighbors):
"""Find the…

ellie123
- 11
- 4
1
vote
1 answer
Querying the "Annoy" index for all the points within radius r
Can I use spotify's "Annoy" package to query points within radius r
https://github.com/tjrileywisc/annoy
I coudn't find any relevant function call in the implementation on their github page.
I have used Kd-tree using query ball point for such…

muni
- 1,263
- 4
- 22
- 31
0
votes
0 answers
I am trying to install the Cell Typist package in Python 3.10.9 and I keep running into a legacy-install-failure error
When i tried using pip install celltypist, an error kept showing up related to problems in installing the package annoy. (https://i.stack.imgur.com/2TVXS.png)
I even updated my Microsoft Visual Studio for C++ and it did not affect the issue. It…
0
votes
0 answers
Illegal Instruction in docker container only when built on a different host
I have a docker image that is built on one of two machines in CI (call them "A" and "B") which uses the python package trimap, which uses annoy under the hood.
The test stage in CI is then run using the built container on one of those machines…

Samuel Neugber
- 1,041
- 1
- 11
- 17
0
votes
0 answers
plotting annoy indices in a 2d scatter plot
def buildTree(data):
f = 300 # Length of item vector that will be indexed
t = AnnoyIndex(f, 'angular')
trees = 10
v = data.columns.get_loc("Vektoren")
for i in range(len(data.index)):
t.add_item(i, data.iloc[i,v])
…

Roland
- 111
- 7
0
votes
0 answers
multiprocessing, adding Items to Annoy Index
I am trying to use Spotify's Annoy for processing a 200K volume dataset.
Sine the dataset is huge, I am trying to use multiprocessing. I constantly get the "cannot pickle annoy object" error.
I changed my code to add the items to the annoy index…

P Ved
- 109
- 3
- 13