Open zakarianamikaz opened 5 years ago
hey @zakarianamikaz , check this directory: https://github.com/oudalab/Arabic-NER/tree/master/ar_output_all/model0 the model after training should have the accurary.json, urs does not have it, better way is you debug and figure out why u are mission that file, suggest you read a little bit about how spacy works with its model traning.
python -m spacy train ar ./ar_test1 ./data/train.json ./data/dev.json Training pipeline: ['tagger', 'parser', 'ner'] Starting with blank model 'ar' Counting training words (limit=0)
Itn Dep Loss NER Loss UAS NER P NER R NER F Tag % Token % CPU WPS GPU WPS
✔ Saved model to output directory ar_test1/model-final
Traceback (most recent call last): File "/home/zakaria/.local/lib/python3.6/site-packages/spacy/cli/train.py", line 281, in train scorer = nlp_loaded.evaluate(dev_docs, debug) File "/home/zakaria/.local/lib/python3.6/site-packages/spacy/language.py", line 631, in evaluate docs, golds = zip(*docs_golds) ValueError: not enough values to unpack (expected 2, got 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/zakaria/anaconda3/envs/py/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/home/zakaria/anaconda3/envs/py/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/zakaria/.local/lib/python3.6/site-packages/spacy/main.py", line 35, in
plac.call(commands[command], sys.argv[1:])
File "/home/zakaria/.local/lib/python3.6/site-packages/plac_core.py", line 328, in call
cmd, result = parser.consume(arglist)
File "/home/zakaria/.local/lib/python3.6/site-packages/plac_core.py", line 207, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "/home/zakaria/.local/lib/python3.6/site-packages/spacy/cli/train.py", line 368, in train
best_model_path = _collate_best_model(meta, output_path, nlp.pipe_names)
File "/home/zakaria/.local/lib/python3.6/site-packages/spacy/cli/train.py", line 425, in _collate_best_model
bests[component] = _find_best(output_path, component)
File "/home/zakaria/.local/lib/python3.6/site-packages/spacy/cli/train.py", line 444, in _find_best
accs = srsly.read_json(epoch_model / "accuracy.json")
File "/home/zakaria/.local/lib/python3.6/site-packages/srsly/_json_api.py", line 50, in read_json
file_path = force_path(location)
File "/home/zakaria/.local/lib/python3.6/site-packages/srsly/util.py", line 21, in force_path
raise ValueError("Can't read file: {}".format(location))
ValueError: Can't read file: ar_test1/model0/accuracy.json