Same command not working after upgrading prodigy to 1.10.8

Here is the command I've been using successfully to start the review task with version 1.8.5:

prodigy custom_mark dpc_retrain_games_21Q2_manrev_batch1_rev3 data/dpc_retrain_games_21Q2_manrev_batch1_rev3_input.jsonl -F -v choice -M -p 82`

After upgrading to 1.10.8 and running the same command, I get:

13:52:11: RECIPE: Calling recipe 'custom_mark'

Dataset ID: dpc_retrain_games_21Q2_manrev_batch1_rev3

13:52:11: RECIPE: Starting recipe mark

✘ The --view-id argument (annotation UI to use) is required

Tried with --view-id=choice as well.


Am I correct in assuming that custom_mark is a custom recipe you've written in the file And that this custom_mark recipe perhaps calls Prodigy's built-in mark recipe?

If so - you need to make sure that the custom recipe custom_mark sets the view_id of mark properly - in other words, that it passes either your input along, or sets it as choice by default. Because the mark recipe was indeed upgraded to require this view_id.

Let me know if that solves your issue or not!

Yes, that's correct. Do you have an example of how to set it properly? Here is what I have currently:

dataset=('Dataset ID', 'positional', None, str),
view_id=('Annotation interface', 'option', 'v', 'domain_top_5'),
memorize=('Enable answer cache', 'flag', 'M', bool),
port=('Port to run application on', 'option', 'p', str),
exclude=('Exclude data from dataset', 'option', 'e', str)


(py3.8) dpc@prodigy-server1:~/dpc# prodigy custom_mark dpc_retrain_games_21Q2_manrev_batch1_rev3 data/dpc_retrain_games_21Q2_manrev_batch1_rev3_input.jsonl -F -v domain_top_5 -M -p 82

Resulting in:

15:46:51: RECIPE: Calling recipe 'custom_mark'
Traceback (most recent call last):
File "/root/miniconda3/envs/py3.8/lib/python3.8/", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/root/miniconda3/envs/py3.8/lib/python3.8/", line 87, in _run_code
exec(code, run_globals)
File "/root/miniconda3/envs/py3.8/lib/python3.8/site-packages/prodigy/", 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 "/root/miniconda3/envs/py3.8/lib/python3.8/site-packages/", line 363, in call
parser = parser_from(obj)
File "/root/miniconda3/envs/py3.8/lib/python3.8/site-packages/", line 147, in parser_from
File "/root/miniconda3/envs/py3.8/lib/python3.8/site-packages/", line 318, in populate_from
File "/root/miniconda3/envs/py3.8/lib/python3.8/", line 1373, in add_argument
raise ValueError('%r is not callable' % (type_func,))
ValueError: 'domain_top_5' is not callable

What are you trying to achieve with the domain_top_5 here? The recipe arguments describe the arguments available on the CLI and the 4th element here should be the value type of converter function, e.g. str if the expected value is a string, etc. So you probably want this to be str here, so you can write --view-id text on the CLI and the argument your function gets is the string "text". Also see here for a more detailed explanation:

In your function, you just need to make sure to pass this value correctly to whatever you're calling under the hood, e.g. the mark function.

My mistake with the 4th element, I forgot to change it back to str after experimening.

I got everything working by passing in view_id directly to mark (while before it was set as a property of resulting dictionary).

Great, happy to hear it!