When using PatternMatcher for a text classification task (so label_task is True, but label_span is False), if all_examples is set to True, it gives the following error:
Traceback (most recent call last):
File "C:\Users\Roland\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Roland\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "D:\Work\staa\.venv\lib\site-packages\prodigy\__main__.py", line 61, in <module>
controller = recipe(*args, use_plac=True)
File "cython_src\prodigy\core.pyx", line 329, in prodigy.core.recipe.recipe_decorator.recipe_proxy
File "D:\Work\staa\.venv\lib\site-packages\plac_core.py", line 367, in call
cmd, result = parser.consume(arglist)
File "D:\Work\staa\.venv\lib\site-packages\plac_core.py", line 232, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "D:\Work\staa\prodigy_models\.\min_pattern_bug.py", line 38, in manual
stream = list(matcher(stream))
File "cython_src\prodigy\models\matcher.pyx", line 215, in __call__
IndexError: list index out of range
If label_task
is set to False or all_examples
is set to False, it works.
An example recipe to reproduce the issue can be found here: Reproduction for PatternMatcher bug · GitHub
I am using prodigy==1.11.7