train-curve error (unexpected keyword argument 'label')

Hi, I ran the train-curve recipe on version 0.3 and looks to be a bug in the function signature. I removed the label argument from batch_train method and it works.

(prodigy) ~/prodigy$ prodigy textcat.train-curve DATASET_NAME en_core_web_sm --dropout .5

Starting with model en_core_web_sm
Dropout: 0.5  Batch size: 10  Iterations: 5  Samples: 4

%          ACCURACY
Traceback (most recent call last):
  File "/usr/lib/python3.6/", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/", line 85, in _run_code
    exec(code, run_globals)
  File "/home/writelab/envs/prodigy/lib/python3.6/site-packages/prodigy/", line 235, in <module>
    controller = recipe(*args, use_plac=True)
  File "cython_src/prodigy/core.pyx", line 129, in prodigy.core.recipe.recipe_decorator.recipe_proxy
  File "/home/writelab/envs/prodigy/lib/python3.6/site-packages/", line 328, in call
    cmd, result = parser.consume(arglist)
  File "/home/writelab/envs/prodigy/lib/python3.6/site-packages/", line 207, in consume
    return cmd, self.func(*(args + varargs + extraopts), **kwargs)
  File "/home/writelab/envs/prodigy/lib/python3.6/site-packages/prodigy/recipes/", line 178, in train_curve
    eval_split=eval_split, silent=True)
TypeError: batch_train() got an unexpected keyword argument 'label'

Ah damn, thanks! This will definitely be fixed in the next release.

Since batch-train now reads the labels from the examples, there’s also no need for the label on the other train commands anymore – so this should have been removed and not passed in.

1 Like