-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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:
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 OK
nginx_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 OK
ner_1 | INFO: 172.20.0.6:56810 - "POST /api/v1/ner/predict HTTP/1.0" 500 Internal Server Error
ner_1 | ERROR: Exception in ASGI application
ner_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_asgi
ner_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 None
ner_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 None
ner_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 app
ner_1 | response = await func(request)
ner_1 | File "/usr/local/lib/python3.7/site-packages/fastapi/routing.py", line 127, in app
ner_1 | raw_response = await dependant.call(**values)
ner_1 | File "./app/api/ner.py", line 46, in named_entity_recognition
ner_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 load
ner_1 | return util.load_model(name, **overrides)
ner_1 | File "/usr/local/lib/python3.7/site-packages/spacy/util.py", line 116, in load_model
ner_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_path
ner_1 | return nlp.from_disk(model_path)
ner_1 | File "/usr/local/lib/python3.7/site-packages/spacy/language.py", line 647, in from_disk
ner_1 | util.from_disk(path, deserializers, exclude)
ner_1 | File "/usr/local/lib/python3.7/site-packages/spacy/util.py", line 511, in from_disk
ner_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_disk
ner_1 | File "/usr/local/lib/python3.7/pathlib.py", line 1203, in open
ner_1 | opener=self._opener)
ner_1 | File "/usr/local/lib/python3.7/pathlib.py", line 1058, in _opener
ner_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"
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working