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
OSError: Index size is not a multiple of vector size #423
Comments
can you share code? |
this is my code .please help me check it .thanks |
this doesn't seem right – that error should only be thrown at the point of loading an index. is there more code to it? |
there has not other code ,the detail error is : |
i guess whether is the vocab size too large . i run the vocab size 100000 is ok |
That's super odd, but looks like i guess we could catch this and inspect errno to find out what's really going on |
so ,annoy index just can reach the maximum index (2^64-1), and it just not a multiple of 812。and throw the error |
there's no way your index is that big though |
so the annoy is not suitable for big word2vec model,which contain lot of vocab,such as more than 1000000 |
@huanggengkeng it totally is. you're having some other issues. i'm making a fix so that we throw a proper error when |
are you on some weird platform like windows? |
Handle lseek failures – follow up from #423
I am having this issue. Index has about 2 million vectors of size 300. I am on "a weird platform like Windows" :D |
can you install the latest version from github and try? I improved the error messages recently for this bug |
I'm also experiencing this error with the latest version. |
can you share code? typically happens when you open with the wrong metric |
I had the same error. I passed different (larger) vector dimensions when loading index. |
yeah , this is the case when i was getting the error. We have to pass the same metric while indexing and loading. Giving the same metric solved the issue. |
Thanks, Switching to Euclidean fixed it. |
i have the same issue. print(args.annoy_file_path)annoyIndex.load(args.annoy_file_path) |
I was having the issue "Index size is not a multiple of vector size: Unknown error: 316 (316)" Downgrading annoy from 1.16.3 to 1.15.1 solved the issue for me. |
That's super odd – nothing major should have changed between 1.15 and 1.16. What platform are you on? |
Ok. Figured out it was an incomplete download that caused the error. The error disappeared when downgrading, but the index was empty. With the complete download, it works fine in both versions. |
great! |
Just ran into this as well, perhaps a more informative error message is warranted, since this commonly happens when you open with the wrong metric? |
@thvasilo – sure, mind sending a pull request with a more descriptive message? |
Sure! Can you point me in the right direction (file) ? I tried searching
for this error message in the code base but couldn't find it
…On Fri, May 1, 2020, 07:10 Erik Bernhardsson ***@***.***> wrote:
@thvasilo <https://github.com/thvasilo> – sure, mind sending a pull
request with a more descriptive message?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#423 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACFBHI7SWVQVW6R67HLTFPLRPLJ65ANCNFSM4I2IRGVQ>
.
|
should be in annoylib.h, i think |
Users might commonly save with a non-default metric, then try to open using the default metric. This gives a more informative message. @erikbern let me know if you like the language and if line length is a concern.
i use annoy to build ,which the number of words is 5844240 and the vector size is 200. it raise a error: 【OSError: Index size is not a multiple of vector size】。please help me
The text was updated successfully, but these errors were encountered: