Processor: allow empty output file grp#1321
Conversation
kba
left a comment
There was a problem hiding this comment.
I ran into this same issue with OCR-D/ocrd_anybaseocr#112.
| set_json_key_value_overrides(kwargs['parameter'], *kwargs.pop('parameter_override')) | ||
| # Assert -I / -O | ||
| if not kwargs['input_file_grp']: | ||
| if 'input_file_grp' not in kwargs: |
There was a problem hiding this comment.
| if 'input_file_grp' not in kwargs: | |
| if not kwargs.get('input_file_grp', None): |
as discussed
There was a problem hiding this comment.
ocrd-olahd-client requires neither input nor output. But since that is a fairly esoteric processor that no one seems to be using, probably not reason enough to change that behavior in spec/core.
@MehmedGIT @j-panzer @joschrew Is the OLA-HD client still in use?
There was a problem hiding this comment.
@kba, no it is not used by Operandi nor the Integration script.
There was a problem hiding this comment.
Perhaps we could treat this as a special case: do require an input fileGrp, but only for informational purposes or to represent workflow dependency (final fileGrp), not for actually doing something specific with that fileGrp.
So instead of input_file_grp_cardinality: 0 this would become 1.
It would require users specify an input fileGrp, but that should normally not be a problem – either pass the "maximal" fileGrp of the workflow, or just use OCR-D-IMG.
(Just to make sure we don't bend the spec because of this.)
Co-authored-by: Konstantin Baierer <kba@users.noreply.github.com>
Spec actually says this is legitimate. We have processors like ocrd-docstruct, or might have evaluators etc. that simply do not produce output in the form of a file group.