unitxt.card module

class unitxt.card.TaskCard(__tags__: ~typing.Dict[str, str] = {}, data_classification_policy: ~typing.List[str] = None, loader: ~unitxt.loaders.Loader, preprocess_steps: ~typing.List[~unitxt.operator.StreamingOperator] = None, task: ~unitxt.task.Task, templates: ~unitxt.collections.Collection = None, sampler: ~unitxt.splitters.Sampler = RandomSampler(__type__='random_sampler', __description__=None, __tags__={}, __id__=None, data_classification_policy=None, sample_size=None))

Bases: Artifact

TaskCard delineates the phases in transforming the source dataset into a model-input, and specifies the metrics for evaluation of model-output.

loader

specifies the source address and the loading operator that can access that source and transform it into a unitxt multistream.

Type:

unitxt.loaders.Loader

preprocess_steps

list of unitxt operators to process the data source into a model-input.

Type:

List[unitxt.operator.StreamingOperator]

task

specifies the fields (of the already (pre)processed instance) making the inputs, the fields making the outputs, and the metrics to be used for evaluating the model output.

Type:

unitxt.task.Task

templates

format strings to be applied on the input fields (specified by the task) and the output fields. The template also carries the instructions and the list of postprocessing steps, to be applied to the model output.

Type:

unitxt.collections.Collection