unitxt.task module¶
- class unitxt.task.FormTask(__tags__: ~typing.Dict[str, str] = {}, caching: bool = None, apply_to_streams: ~typing.List[str] = None, dont_apply_to_streams: ~typing.List[str] = None, inputs: ~typing.List[str], outputs: ~typing.List[str], metrics: ~typing.List[str], augmentable_inputs: ~typing.List[str] = [])¶
Bases:
Tasker,StreamInstanceOperatorFormTask packs the different instance fields into dictionaries by their roles in the task.
- The output instance contains three fields:
“inputs” whose value is a sub-dictionary of the input instance, consisting of all the fields listed in Arg ‘inputs’. “outputs” – for the fields listed in Arg “outputs”. “metrics” – to contain the value of Arg ‘metrics’
- augmentable_inputs: List[str] = []¶
- class unitxt.task.MultipleChoiceTask(__tags__: ~typing.Dict[str, str] = {}, caching: bool = None, apply_to_streams: ~typing.List[str] = None, dont_apply_to_streams: ~typing.List[str] = None, inputs: ~typing.List[str], outputs: ~typing.List[str], metrics: ~typing.List[str], augmentable_inputs: ~typing.List[str] = [], choices_field: str = 'choices', choices_separator: str = '\n', enumeration_suffix: str = '. ', use_text_in_target: bool = False, alphabet: str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')¶
Bases:
FormTask
- class unitxt.task.Tasker¶
Bases:
object