{"action":"closed","issue":{"url":"https://api.github.com/repos/explosion/spaCy/issues/1907","repository_url":"https://api.github.com/repos/explosion/spaCy","labels_url":"https://api.github.com/repos/explosion/spaCy/issues/1907/labels{/name}","comments_url":"https://api.github.com/repos/explosion/spaCy/issues/1907/comments","events_url":"https://api.github.com/repos/explosion/spaCy/issues/1907/events","html_url":"https://github.com/explosion/spaCy/issues/1907","id":292577320,"node_id":"MDU6SXNzdWUyOTI1NzczMjA=","number":1907,"title":"Error in spacy train","user":{"login":"ahalterman","id":4378727,"node_id":"MDQ6VXNlcjQzNzg3Mjc=","avatar_url":"https://avatars3.githubusercontent.com/u/4378727?v=4","gravatar_id":"","url":"https://api.github.com/users/ahalterman","html_url":"https://github.com/ahalterman","followers_url":"https://api.github.com/users/ahalterman/followers","following_url":"https://api.github.com/users/ahalterman/following{/other_user}","gists_url":"https://api.github.com/users/ahalterman/gists{/gist_id}","starred_url":"https://api.github.com/users/ahalterman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahalterman/subscriptions","organizations_url":"https://api.github.com/users/ahalterman/orgs","repos_url":"https://api.github.com/users/ahalterman/repos","events_url":"https://api.github.com/users/ahalterman/events{/privacy}","received_events_url":"https://api.github.com/users/ahalterman/received_events","type":"User","site_admin":false},"labels":[{"id":881663930,"node_id":"MDU6TGFiZWw4ODE2NjM5MzA=","url":"https://api.github.com/repos/explosion/spaCy/labels/feat%20/%20ner","name":"feat / ner","color":"ddfc74","default":false},{"id":710446668,"node_id":"MDU6TGFiZWw3MTA0NDY2Njg=","url":"https://api.github.com/repos/explosion/spaCy/labels/training","name":"training","color":"087EA6","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-01-29T22:03:02Z","updated_at":"2018-09-12T13:42:47Z","closed_at":"2018-09-12T13:42:47Z","author_association":"NONE","body":"I'm trying to train an NER model using `spacy train` on data that's in spaCy's JSON format. I've set all the dependency and POS labels to `\"\"` and the `head` to `0` and given the model the `--no-tagger --no-parser` arguments. After the first epoch of training, I get this error:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/Users/ahalterman/anaconda3/lib/python3.6/runpy.py\", line 193, in _run_module_as_main\r\n    \"__main__\", mod_spec)\r\n  File \"/Users/ahalterman/anaconda3/lib/python3.6/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/Users/ahalterman/anaconda3/lib/python3.6/site-packages/spacy/__main__.py\", line 31, in <module>\r\n    plac.call(commands[command])\r\n  File \"/Users/ahalterman/anaconda3/lib/python3.6/site-packages/plac_core.py\", line 328, in call\r\n    cmd, result = parser.consume(arglist)\r\n  File \"/Users/ahalterman/anaconda3/lib/python3.6/site-packages/plac_core.py\", line 207, in consume\r\n    return cmd, self.func(*(args + varargs + extraopts), **kwargs)\r\n  File \"/Users/ahalterman/anaconda3/lib/python3.6/site-packages/spacy/cli/train.py\", line 130, in train\r\n    scorer = nlp_loaded.evaluate(dev_docs)\r\n  File \"/Users/ahalterman/anaconda3/lib/python3.6/site-packages/spacy/language.py\", line 472, in evaluate\r\n    scorer.score(doc, gold, verbose=verbose)\r\n  File \"/Users/ahalterman/anaconda3/lib/python3.6/site-packages/spacy/scorer.py\", line 91, in score\r\n    for annot in gold.orig_annot]))\r\n  File \"gold.pyx\", line 31, in spacy.gold.tags_to_entities\r\nAssertionError: ['B-ORG', 'I-ORG', 'L-ORG', 'O', 'U-GPE', 'O', 'B-DATE', 'L-DATE', 'O', 'O', 'O', 'B-ORG', 'I-ORG', 'L-ORG', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'U-GPE', 'O', 'O', 'O', 'O', 'O', 'U-ORDINAL', 'O', 'O', 'O', 'U-ORDINAL', 'B-ORG', 'I-ORG', 'I-ORG', 'I-ORG', 'L-ORG', 'O', 'U-GPE', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'U-GPE', 'O', 'O', 'O', 'O', 'O', 'B-DATE', 'I-DATE', 'I-DATE', 'L-DATE', 'O', 'O', 'U-GPE', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'B-LOC', 'I-LOC', 'L-LOC', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'B-DATE', 'I-DATE', 'I-DATE', 'I-DATE', 'I-DATE', 'I-DATE', 'I-DATE', 'I-DATE', 'I-DATE', 'L-DATE', 'O', 'U-GPE', 'O', 'O', 'O', 'O', 'B-GPE', 'I-GPE', 'L-GPE', 'O', 'O', 'B-DATE', 'I-DATE', 'I-DATE', 'I-DATE', 'I-DATE', 'I-DATE', 'I-DATE', 'L-DATE', 'O', 'O', 'B-GPE', 'L-GPE', 'O', 'O', 'B-DATE', 'I-DATE', 'I-DATE', 'I-DATE', 'L-DATE', 'O', 'O', 'B-GPE', 'I-GPE', 'L-GPE', 'O', 'O', 'O', 'B-DATE', 'I-DATE', 'L-DATE', 'O', 'B-GPE', 'L-GPE', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'B-DATE', 'I-DATE', 'I-DATE', 'L-DATE', 'O', 'O', 'U-GPE', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'U-DATE', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'U-DATE', 'O', 'O', 'B-EVENT', 'I-EVENT', 'I-EVENT', 'L-EVENT', 'O', 'O', 'O', 'O', 'U-NORP', 'O', 'O', 'O', 'O', 'U-GPE', 'O', 'U-DATE', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'U-NORP', 'O', 'O', 'U-DATE', 'O', 'O', 'O', 'O', 'O', 'U-GPE', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'B-DATE', 'I-DATE', 'I-DATE', 'I-DATE', 'I-DATE', 'I-DATE', 'I-DATE', 'I-DATE', 'L-DATE', 'O', 'U-GPE', 'O', 'O', 'O', 'O', 'B-ORG', 'I-ORG', 'L-ORG', 'O', 'O', 'B-ORG', 'L-ORG', 'O', 'B-ORG', 'I-ORG', 'I-ORG', 'B-ORG', 'I-ORG', 'L-ORG']\r\n```\r\n\r\nDo you know what's going on? Here's the relevant part of my data, and I can share a complete training file if that's helpful.\r\n\r\n```\r\n{\"head\": 0, \r\n\"dep\": \"\", \r\n\"tag\": \"\", \r\n\"orth\": \"that \", \r\n\"ner\": \"O\", \r\n\"id\": 19}, \r\n{\"head\": 0, \r\n\"dep\": \"\", \r\n\"tag\": \"\", \r\n\"orth\": \"China \", \r\n\"ner\": \"U-GPE\", \r\n\"id\": 20}, ...\r\n```\r\n\r\n## Your Environment\r\n<!-- Include details of your environment. If you're using spaCy 1.7+, you can also type \r\n`python -m spacy info --markdown` and copy-paste the result here.-->\r\n* Operating System: \r\n* Python Version Used: \r\n* spaCy Version Used: \r\n* Environment Information: \r\n"}}
{"actor":{"display_login":"honnibal"}}