Error when using spacy CLI train command
See original GitHub issueI tried to train a tagger and parser using the spacy CLI train command:
python -m spacy train <lang> . <lang>-train.json --no-ner
The script breaks at the end of the training; here is the output:
Itn. N weight N feats UAS NER F. Tag % Token %
100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 1455/1455 [01:11<00:00, 20.37it/s]
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/ubuntu/spaCy/spacy/__main__.py", line 133, in <module>
plac.Interpreter.call(CLI)
File "/home/ubuntu/spaCy/.env/local/lib/python2.7/site-packages/plac_ext.py", line 1142, in call
print(out)
File "/home/ubuntu/spaCy/.env/local/lib/python2.7/site-packages/plac_ext.py", line 914, in __exit__
self.close(exctype, exc, tb)
File "/home/ubuntu/spaCy/.env/local/lib/python2.7/site-packages/plac_ext.py", line 952, in close
self._interpreter.throw(exctype, exc, tb)
File "/home/ubuntu/spaCy/.env/local/lib/python2.7/site-packages/plac_ext.py", line 964, in _make_interpreter
arglist = yield task
File "/home/ubuntu/spaCy/.env/local/lib/python2.7/site-packages/plac_ext.py", line 1139, in call
raise_(task.etype, task.exc, task.tb)
File "/home/ubuntu/spaCy/.env/local/lib/python2.7/site-packages/plac_ext.py", line 380, in _wrap
for value in genobj:
File "/home/ubuntu/spaCy/.env/local/lib/python2.7/site-packages/plac_ext.py", line 95, in gen_exc
raise_(etype, exc, tb)
File "/home/ubuntu/spaCy/.env/local/lib/python2.7/site-packages/plac_ext.py", line 966, in _make_interpreter
cmd, result = self.parser.consume(arglist)
File "/home/ubuntu/spaCy/.env/local/lib/python2.7/site-packages/plac_core.py", line 207, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "/home/ubuntu/spaCy/spacy/__main__.py", line 95, in train
not no_parser, not no_ner, parser_L1)
File "/home/ubuntu/spaCy/spacy/cli/train.py", line 39, in train
entity_cfg, n_iter)
File "/home/ubuntu/spaCy/spacy/cli/train.py", line 68, in train_model
**dev_scores.scores)
AttributeError: 'list' object has no attribute 'scores'
My current environment is:
Info about spaCy
Python version 2.7.12
Platform Linux-4.4.0 Ubuntu-16.04
spaCy version 1.8.0
Installed models
Location /home/ubuntu/spaCy/spacy
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Command Line Interface Β· spaCy API Documentation
spaCy's CLI provides a range of helpful commands for downloading and training pipelines, converting data and debugging your config, data and installation.
Read more >python - Spacy 3.1 - KeyError: 'train' using spacy train command
This error happens because spaCy looks for the [train] block in the config but there's no such thing.
Read more >Unable to use Prodigy annotations with SpaCy CLI train - usage
But when I try to use the same annotation dataset (exported using ner.gold-to-spacy) with the cli "train" command I get the following error....
Read more >7. How to Train spaCy NER Model
In this simple, toy example, we are going to do (intentionally) a major mistake in ML. We are going to use not only...
Read more >Training and integrating a custom text classifier to a spacy ...
sentences error: [E030] Sentence boundaries unset. You can add the 'sentencizer' component to the pipeline with: `nlp.add_pipe('sentencizer')`. Alternatively,Β ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is finally fixed in v2.0.0 alpha!
Sorry this was my fault. Try again? Just made another tweak.