Hi,
I have implemented spacy -fastapi service in my local machine with your code. I have used my custom model and run the main.py . However the reloader process started to load I get the traceback error as mentioned below:
2021-03-16 08:57:16,139 loglevel=INFO logger=root () L15 loading spacy nlp model
nlp_models/model_spacy
2021-03-16 08:57:16,916 loglevel=INFO logger=pytorch_transformers.modeling_bert () L226 Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex .
2021-03-16 08:57:16,937 loglevel=INFO logger=pytorch_transformers.modeling_xlnet () L339 Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex .
2021-03-16 08:57:17,827 loglevel=INFO logger=root () L19 done loading spacy nlp model
Process SpawnProcess-1:
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/opt/conda/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/opt/conda/lib/python3.6/site-packages/uvicorn/subprocess.py", line 61, in subprocess_started
target(sockets=sockets)
File "/opt/conda/lib/python3.6/site-packages/uvicorn/main.py", line 407, in run
loop.run_until_complete(self.serve(sockets=sockets))
File "uvloop/loop.pyx", line 1417, in uvloop.loop.Loop.run_until_complete
File "/opt/conda/lib/python3.6/site-packages/uvicorn/main.py", line 414, in serve
config.load()
File "/opt/conda/lib/python3.6/site-packages/uvicorn/config.py", line 300, in load
self.loaded_app = import_from_string(self.app)
File "/opt/conda/lib/python3.6/site-packages/uvicorn/importer.py", line 20, in import_from_string
module = importlib.import_module(module_str)
File "/opt/conda/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "./app/main.py", line 47, in
from .routes import nlp
File "./app/routes/nlp.py", line 15, in
404: {'description': 'Not Found'}
TypeError: init() got an unexpected keyword argument 'prefix'
Hi, I have implemented spacy -fastapi service in my local machine with your code. I have used my custom model and run the main.py . However the reloader process started to load I get the traceback error as mentioned below:
2021-03-16 08:57:16,139 loglevel=INFO logger=root() L15 loading spacy nlp model
nlp_models/model_spacy
2021-03-16 08:57:16,916 loglevel=INFO logger=pytorch_transformers.modeling_bert () L226 Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex .
2021-03-16 08:57:16,937 loglevel=INFO logger=pytorch_transformers.modeling_xlnet () L339 Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex .
2021-03-16 08:57:17,827 loglevel=INFO logger=root () L19 done loading spacy nlp model
Process SpawnProcess-1:
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/opt/conda/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/opt/conda/lib/python3.6/site-packages/uvicorn/subprocess.py", line 61, in subprocess_started
target(sockets=sockets)
File "/opt/conda/lib/python3.6/site-packages/uvicorn/main.py", line 407, in run
loop.run_until_complete(self.serve(sockets=sockets))
File "uvloop/loop.pyx", line 1417, in uvloop.loop.Loop.run_until_complete
File "/opt/conda/lib/python3.6/site-packages/uvicorn/main.py", line 414, in serve
config.load()
File "/opt/conda/lib/python3.6/site-packages/uvicorn/config.py", line 300, in load
self.loaded_app = import_from_string(self.app)
File "/opt/conda/lib/python3.6/site-packages/uvicorn/importer.py", line 20, in import_from_string
module = importlib.import_module(module_str)
File "/opt/conda/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "./app/main.py", line 47, in
from .routes import nlp
File "./app/routes/nlp.py", line 15, in
404: {'description': 'Not Found'}
TypeError: init() got an unexpected keyword argument 'prefix'
Can you please help me out .