You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have all other models working except for NER, which uses spaCy. lexemes.bin seems to be missing. I've used spaCy before, but not with an unpackaged model like this appears to be. Any pointers welcomed.
This is my trace:
nginx_1 | 172.20.0.1 - - [26/Aug/2020:12:29:56 +0000] "GET /api/v1/ner/docs HTTP/1.1" 200 910 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36" "-"ner_1 | INFO: 172.20.0.6:56800 - "GET /api/v1/ner/openapi.json HTTP/1.0" 200 OKnginx_1 | 172.20.0.1 - - [26/Aug/2020:12:29:57 +0000] "GET /api/v1/ner/openapi.json HTTP/1.1" 200 2724 "http://localhost:8080/api/v1/ner/docs" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36" "-"nginx_1 | 172.20.0.1 - - [26/Aug/2020:12:30:15 +0000] "GET /api/v1/ner/info HTTP/1.1" 200 163 "http://localhost:8080/api/v1/ner/docs" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36" "-"ner_1 | INFO: 172.20.0.6:56802 - "GET /api/v1/ner/info HTTP/1.0" 200 OKner_1 | INFO: 172.20.0.6:56810 - "POST /api/v1/ner/predict HTTP/1.0" 500 Internal Server Errorner_1 | ERROR: Exception in ASGI applicationner_1 | Traceback (most recent call last):ner_1 | File "/usr/local/lib/python3.7/site-packages/uvicorn/protocols/http/httptools_impl.py", line 385, in run_asginer_1 | result = await app(self.scope, self.receive, self.send)ner_1 | File "/usr/local/lib/python3.7/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__ner_1 | return await self.app(scope, receive, send)ner_1 | File "/usr/local/lib/python3.7/site-packages/fastapi/applications.py", line 140, in __call__ner_1 | await super().__call__(scope, receive, send)ner_1 | File "/usr/local/lib/python3.7/site-packages/starlette/applications.py", line 134, in __call__ner_1 | await self.error_middleware(scope, receive, send)ner_1 | File "/usr/local/lib/python3.7/site-packages/starlette/middleware/errors.py", line 178, in __call__ner_1 | raise exc from Nonener_1 | File "/usr/local/lib/python3.7/site-packages/starlette/middleware/errors.py", line 156, in __call__ner_1 | await self.app(scope, receive, _send)ner_1 | File "/usr/local/lib/python3.7/site-packages/starlette/exceptions.py", line 73, in __call__ner_1 | raise exc from Nonener_1 | File "/usr/local/lib/python3.7/site-packages/starlette/exceptions.py", line 62, in __call__ner_1 | await self.app(scope, receive, sender)ner_1 | File "/usr/local/lib/python3.7/site-packages/starlette/routing.py", line 590, in __call__ner_1 | await route(scope, receive, send)ner_1 | File "/usr/local/lib/python3.7/site-packages/starlette/routing.py", line 208, in __call__ner_1 | await self.app(scope, receive, send)ner_1 | File "/usr/local/lib/python3.7/site-packages/starlette/routing.py", line 41, in appner_1 | response = await func(request)ner_1 | File "/usr/local/lib/python3.7/site-packages/fastapi/routing.py", line 127, in appner_1 | raw_response = await dependant.call(**values)ner_1 | File "./app/api/ner.py", line 46, in named_entity_recognitionner_1 | ner_process = NerProcessor(model=item.model.lower())ner_1 | File "./app/api/nerpro.py", line 21, in __init__ner_1 | self.model = spacy.load("./app/api/spacy/", disable=["tagger", "parser"])ner_1 | File "/usr/local/lib/python3.7/site-packages/spacy/__init__.py", line 21, in loadner_1 | return util.load_model(name, **overrides)ner_1 | File "/usr/local/lib/python3.7/site-packages/spacy/util.py", line 116, in load_modelner_1 | return load_model_from_path(Path(name), **overrides)ner_1 | File "/usr/local/lib/python3.7/site-packages/spacy/util.py", line 156, in load_model_from_pathner_1 | return nlp.from_disk(model_path)ner_1 | File "/usr/local/lib/python3.7/site-packages/spacy/language.py", line 647, in from_diskner_1 | util.from_disk(path, deserializers, exclude)ner_1 | File "/usr/local/lib/python3.7/site-packages/spacy/util.py", line 511, in from_diskner_1 | reader(path / key)ner_1 | File "/usr/local/lib/python3.7/site-packages/spacy/language.py", line 635, in <lambda>ner_1 | self.vocab.from_disk(p) and _fix_pretrained_vectors_name(self))),ner_1 | File "vocab.pyx", line 377, in spacy.vocab.Vocab.from_diskner_1 | File "/usr/local/lib/python3.7/pathlib.py", line 1203, in openner_1 | opener=self._opener)ner_1 | File "/usr/local/lib/python3.7/pathlib.py", line 1058, in _openerner_1 | return self._accessor.open(self, flags, mode)ner_1 | FileNotFoundError: [Errno 2] No such file or directory: 'app/api/spacy/vocab/lexemes.bin'nginx_1 | 172.20.0.1 - - [26/Aug/2020:12:32:00 +0000] "POST /api/v1/ner/predict HTTP/1.1" 500 21 "http://localhost:8080/api/v1/ner/docs" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36" "-"
This is the request body I used from Swagger:
{
"model": "spaCy",
"text": "Dense, real valued vectors representing distributional similarity information are now a cornerstone of practical NLP. The most common way to train these vectors is the Word2vec family of algorithms. If you need to train a word2vec model, we recommend the implementation in the Python library Gensim.",
"query": "string"
}
The text was updated successfully, but these errors were encountered:
Hi,
I have all other models working except for NER, which uses spaCy.
lexemes.bin
seems to be missing. I've used spaCy before, but not with an unpackaged model like this appears to be. Any pointers welcomed.This is my trace:
This is the request body I used from Swagger:
The text was updated successfully, but these errors were encountered: