Towards the end I had to change the vectors path from en_core_web_lg to "P:\Documents\Python Scripts\newPythonEnv\Additive_NER_Spacy3\en_core_web_lg-3.2.0.tar\en_core_web_lg-3.2.0\en_core_web_lg\en_core_web_lg-3.2.0\vocab\vectors" this is because I can not fetch the en_core_web_lg model from online servers but only can do that locally (due to work restriction). However I get the following error:
[2022-01-27 16:21:16,595] [INFO] Set up nlp object from config
[2022-01-27 16:21:16,608] [INFO] Pipeline: ['tok2vec', 'ner']
[2022-01-27 16:21:16,613] [INFO] Created vocabulary
Traceback (most recent call last):
File "P:\myPythonEnv\lib\site-packages\spacy\language.py", line 1283, in initialize
init_vocab(
File "P:\myPythonEnv\lib\site-packages\spacy\training\initialize.py", line 131, in init_vocab
load_vectors_into_model(nlp, vectors)
File "P:\myPythonEnv\lib\site-packages\spacy\training\initialize.py", line 152, in load_vectors_into_model
vectors_nlp = load_model(name, vocab=nlp.vocab, exclude=exclude)
File "P:\myPythonEnv\lib\site-packages\spacy\util.py", line 427, in load_model
raise IOError(Errors.E050.format(name=name))
OSError: [E050] Can't find model '"P:\Documents\Python Scripts\newPythonEnv\Additive_NER_Spacy3\en_core_web_lg-3.2.0.tar\en_core_web_lg-3.2.0\en_core_web_lg\en_core_web_lg-3.2.0\vocab\vectors"'. It doesn't seem to be a Python package or a valid path to a data directory.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "P:\myPythonEnv\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "P:\myPythonEnv\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "P:\myPythonEnv\lib\site-packages\spacy\__main__.py", line 4, in <module>
setup_cli()
File "P:\myPythonEnv\lib\site-packages\spacy\cli\_util.py", line 71, in setup_cli
command(prog_name=COMMAND)
File "P:\myPythonEnv\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "P:\myPythonEnv\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "P:\myPythonEnv\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "P:\myPythonEnv\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "P:\myPythonEnv\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "P:\myPythonEnv\lib\site-packages\typer\main.py", line 497, in wrapper
return callback(**use_params) # type: ignore
File "P:\myPythonEnv\lib\site-packages\spacy\cli\train.py", line 45, in train_cli
train(config_path, output_path, use_gpu=use_gpu, overrides=overrides)
File "P:\myPythonEnv\lib\site-packages\spacy\cli\train.py", line 72, in train
nlp = init_nlp(config, use_gpu=use_gpu)
File "P:\myPythonEnv\lib\site-packages\spacy\training\initialize.py", line 84, in init_nlp
nlp.initialize(lambda: train_corpus(nlp), sgd=optimizer)
File "P:\myPythonEnv\lib\site-packages\spacy\language.py", line 1287, in initialize
raise IOError(Errors.E884.format(vectors=I["vectors"]))
OSError: [E884] The pipeline could not be initialized because the vectors could not be found at '"P:\Documents\Python Scripts\newPythonEnv\Additive_NER_Spacy3\en_core_web_lg-3.2.0.tar\en_core_web_lg-3.2.0\en_core_web_lg\en_core_web_lg-3.2.0\vocab\vectors"'. If your pipeline was already initialized/trained before, call 'resume_training' instead of 'initialize', or initialize only the components that are new.
I have tried various paths and all of the gave the same error - these non-working paths are:
I wonder if there is a way to fetch the model using some proxy in the config file or how can I make sure the vectors are loaded locally in a correct manner?
I've made the following config file to make a custom NER:
Towards the end I had to change the vectors path from
en_core_web_lg
to"P:\Documents\Python Scripts\newPythonEnv\Additive_NER_Spacy3\en_core_web_lg-3.2.0.tar\en_core_web_lg-3.2.0\en_core_web_lg\en_core_web_lg-3.2.0\vocab\vectors"
this is because I can not fetch the en_core_web_lg model from online servers but only can do that locally (due to work restriction). However I get the following error:I have tried various paths and all of the gave the same error - these non-working paths are:
I wonder if there is a way to fetch the model using some proxy in the config file or how can I make sure the vectors are loaded locally in a correct manner?
My Spacy version is 3.2.1.