Skip to content
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 on load_vectors_from_bin_loc() #671

Closed
petterhh opened this issue Dec 7, 2016 · 4 comments
Closed

OSError on load_vectors_from_bin_loc() #671

petterhh opened this issue Dec 7, 2016 · 4 comments
Labels
bug Bugs and behaviour differing from documentation

Comments

@petterhh
Copy link
Contributor

petterhh commented Dec 7, 2016

I have a word2vec model (binary) that I want to load into the vocab before training with train_ud.py. Unfortunately, I'm met by an OSError when running load_vectors_from_bin_loc().

Traceback (most recent call last):
  File "spacy/bin/parser/train_ud.py", line 112, in <module>
    plac.call(main)
  File "/Users/petterhohle/.pyenv/versions/spacy/lib/python3.5/site-packages/plac_core.py", line 326, in call
    cmd, result = parser_from(obj).consume(arglist)
  File "/Users/petterhohle/.pyenv/versions/spacy/lib/python3.5/site-packages/plac_core.py", line 209, in consume
    return cmd, self.func(*(args + varargs + extraopts), **kwargs)
  File "spacy/bin/parser/train_ud.py", line 78, in main
    vocab.load_vectors_from_bin_loc('/Users/petterhohle/coding/spacy-nor/nak_nowac.bin')
  File "spacy/vocab.pyx", line 528, in spacy.vocab.Vocab.load_vectors_from_bin_loc (spacy/vocab.cpp:10682)
  File "spacy/cfile.pyx", line 41, in spacy.cfile.CFile.alloc_read (spacy/cfile.cpp:1420)
  File "spacy/cfile.pyx", line 32, in spacy.cfile.CFile.read_into (spacy/cfile.cpp:1279)
OSError

The error message is not exactly descriptive, so I'm wondering what might be the issue here?

@honnibal
Copy link
Member

Agree that the error messaging could be improved. It's difficult because we're reporting from a C error. I need to look into checking the error message properly.

Have you checked the obvious, like whether the file exists, whether you have enough memory...?

@honnibal honnibal added the bug Bugs and behaviour differing from documentation label Dec 10, 2016
@petterhh
Copy link
Contributor Author

Yeah, the file exists - for non-existing files the error is more precise; OSError: Could not open binary file b'<filename>'.

I have 8 GB memory and more than 2 GB available, which should suffice?

@ines
Copy link
Member

ines commented May 7, 2017

Closing this and making #1046 the master issue. Work in progress for spaCy v2.0!

@ines ines closed this as completed May 7, 2017
@lock
Copy link

lock bot commented May 8, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bugs and behaviour differing from documentation
Projects
None yet
Development

No branches or pull requests

3 participants