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

[QUESTION] Regarding unexpected crash... #5

Open
pavelnemirovsky opened this issue Feb 2, 2021 · 1 comment
Open

[QUESTION] Regarding unexpected crash... #5

pavelnemirovsky opened this issue Feb 2, 2021 · 1 comment
Labels
question Further information is requested

Comments

@pavelnemirovsky
Copy link

Description

I am unable to run the Linker REST API service and I am getting following exception:
It is known issue with multi-threaded workers, is there is a fix for that?

**spacy_ann serve** /usr/src/automation/scripts/spacy-ann-linker/models/ann_linker
Your CPU supports instructions that this binary was not compiled to use: SSE3 SSE4.1 SSE4.2 AVX AVX2
For maximum performance, you can install NMSLIB from sources
pip install --no-binary :all: nmslib
Traceback (most recent call last):
  File "/usr/local/bin/spacy_ann", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/spacy_ann/cli/__init__.py", line 24, in main
    typer.run(commands[command])
  File "/usr/local/lib/python3.6/dist-packages/typer/main.py", line 855, in run
    app()
  File "/usr/local/lib/python3.6/dist-packages/typer/main.py", line 214, in __call__
    return get_command(self)(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/typer/main.py", line 497, in wrapper
    return callback(**use_params)  # type: ignore
  File "/usr/local/lib/python3.6/dist-packages/spacy_ann/cli/serve.py", line 22, in serve
    nlp = spacy.load(model)
  File "/usr/local/lib/python3.6/dist-packages/spacy/__init__.py", line 30, in load
    return util.load_model(name, **overrides)
  File "/usr/local/lib/python3.6/dist-packages/spacy/util.py", line 172, in load_model
    return load_model_from_path(Path(name), **overrides)
  File "/usr/local/lib/python3.6/dist-packages/spacy/util.py", line 222, in load_model_from_path
    return nlp.from_disk(model_path, exclude=disable)
  File "/usr/local/lib/python3.6/dist-packages/spacy/language.py", line 974, in from_disk
    util.from_disk(path, deserializers, exclude)
  File "/usr/local/lib/python3.6/dist-packages/spacy/util.py", line 690, in from_disk
    reader(path / key)
  File "/usr/local/lib/python3.6/dist-packages/spacy/language.py", line 969, in <lambda>
    p, exclude=["vocab"]
  File "pipes.pyx", line 673, in spacy.pipeline.pipes.Tagger.from_disk
  File "/usr/local/lib/python3.6/dist-packages/spacy/util.py", line 690, in from_disk
    reader(path / key)
  File "pipes.pyx", line 652, in spacy.pipeline.pipes.Tagger.from_disk.load_model
  File "pipes.pyx", line 560, in spacy.pipeline.pipes.Tagger.Model
  File "/usr/local/lib/python3.6/dist-packages/spacy/_ml.py", line 587, in build_tagger_model
    pretrained_vectors=pretrained_vectors,
  File "/usr/local/lib/python3.6/dist-packages/spacy/_ml.py", line 324, in Tok2Vec
    return _legacy_tok2vec.Tok2Vec(width, embed_size, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/spacy/ml/_legacy_tok2vec.py", line 44, in Tok2Vec
    glove = StaticVectors(pretrained_vectors, width, column=cols.index(ID))
  File "/usr/local/lib/python3.6/dist-packages/thinc/neural/_classes/static_vectors.py", line 43, in __init__
    vectors = self.get_vectors()
  File "/usr/local/lib/python3.6/dist-packages/thinc/neural/_classes/static_vectors.py", line 55, in get_vectors
    return get_vectors(self.ops, self.lang)
  File "/usr/local/lib/python3.6/dist-packages/thinc/extra/load_nlp.py", line 26, in get_vectors
    nlp = get_spacy(lang)
  File "/usr/local/lib/python3.6/dist-packages/thinc/extra/load_nlp.py", line 14, in get_spacy
    SPACY_MODELS[lang] = spacy.load(lang, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/spacy/__init__.py", line 30, in load
    return util.load_model(name, **overrides)
  File "/usr/local/lib/python3.6/dist-packages/spacy/util.py", line 175, in load_model
    raise IOError(Errors.E050.format(name=name))
OSError: [E050] Can't find model 'en_core_web_md.vectors'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.

Additional context

Add any other context or screenshots about the feature request here.

@pavelnemirovsky pavelnemirovsky added the question Further information is requested label Feb 2, 2021
@pavelnemirovsky pavelnemirovsky changed the title [QUESTION] [QUESTION] Regarding unexpected crash... Feb 2, 2021
@kabirkhan
Copy link
Contributor

make sure you have the spacy model downloaded.

So:

python -m spacy download en_core_web_md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants