Bug description:
When loading a custom recipe the following error is raised:
✘ Couldn't load Python code: src/my_recipe.py
Unsupported type for 'dataset': str
Reproduction steps:
How can we recreate the bug?
This is the definition of the custom recipe:
@prodigy.recipe(
"my-recipe",
dataset=("Dataset to save annotations", "positional", None, str),
source=("Path to JSONL file", "positional", None, Path),
source2=("Path to second JSONL file", "positional", None, Path),
)
def my_recipe(dataset: str, source: Path, source2: Path):
It is loaded via the command:
python -m prodigy my-recipe "my_annotations" .\data\file1.jsonl .\data\file2.jsonl -F src/my_recipe.py
It was loading successfully with prodigy v1.11.7. The error is raised after upgrading to v1.18.2.
The error disappears if I remove the type annotations from “my_recipe”
Environment variables:
Please provide prodigy stats or Python version/OS/Prodigy version:
Version 1.18.2
License Type Prodigy Personal
Platform Windows-11-10.0.22631-SP0
Python Version 3.12.10
spaCy Version 3.7.5