Custom recipe cmd argument yields "Annotating non-existing argument"

Hello, I'm trying out a custom recipe (following this guide) and defined it like so:

@prodigy.recipe(
    "custom-textcat",
    dataset=("The dataset", "positional", None, str),
    source=("The source data file", "positional", None, str),
    mypatterns=("Seed patterns", "option", 'p', str),
)
def custom_textcat_recipe(dataset, source, patterns):
   ...

And I call it like so:

prodigy custom-textcat demo_dataset ./my_data.jsonl --mypatterns ./my_patterns.jsonl -F my_custom_model.py

The recipe works if I don't include the argument mypatterns. If I do include it, it throws the following error:

NameError: Annotating non-existing argument: mypatterns

The error comes from the plac library.

Did I use the wrong syntax for the custom argument?

Your workflow sound good, and I think the only problem here is that the name of the argument you're annotating (mypatterns) doesn't match the name of the expected function argument (patterns). So you'd have to change one or the other so Plac knows which argument you're describing there. For instance: def custom_textcat_recipe(dataset, source, mypatterns):.