KeyError: 'label' in Prodigy 1.10.7

I am trying to develop a textcat model to classify ungrammatical sentences a. l. Training a grammar tool - #2 by ines

When I run
'prodigy train textcat (!python -m prodigy train textcat new_set ./Desktop/Retraining_POS_Tagger/tagger_model_3 --output ./Desktop/Grammaticality_Classifier/grammaticality_model --eval-id test_dataset -TE),

I get the following error:

:heavy_check_mark: Loaded model './Desktop/Retraining_POS_Tagger/tagger_model_3'
Traceback (most recent call last):
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/Users/atakanince/groupsolver_env/lib/python3.8/site-packages/prodigy/main.py", line 53, in
controller = recipe(args, use_plac=True)
File "cython_src/prodigy/core.pyx", line 321, in prodigy.core.recipe.recipe_decorator.recipe_proxy
File "/Users/atakanince/groupsolver_env/lib/python3.8/site-packages/plac_core.py", line 367, in call
cmd, result = parser.consume(arglist)
File "/Users/atakanince/groupsolver_env/lib/python3.8/site-packages/plac_core.py", line 232, in consume
return cmd, self.func(
(args + varargs + extraopts), **kwargs)
File "/Users/atakanince/groupsolver_env/lib/python3.8/site-packages/prodigy/recipes/train.py", line 103, in train
data, labels = merge_data(nlp, **merge_cfg)
File "/Users/atakanince/groupsolver_env/lib/python3.8/site-packages/prodigy/recipes/train.py", line 402, in merge_data
for eg in convert_options_to_cats(textcat_validated, exclusive=textcat_exclusive):
File "cython_src/prodigy/components/preprocess.pyx", line 353, in prodigy.components.preprocess.convert_options_to_cats
KeyError: 'label'

This seems to be a duplicate of KeyError: 'label' Error with Prodigy 1.10.7, but the latter has a bit more information, so we can follow up there.

1 Like