π mbppΒΆ
Note
ID: cards.mbpp | Type: TaskCard
{
"loader": {
"name": "full",
"path": "mbpp",
"split": "test",
"type": "load_hf"
},
"preprocess_steps": [
{
"field_to_field": {
"test_list": "test_list_str"
},
"separator": "\n",
"type": "join_str"
}
],
"task": {
"inputs": [
"text",
"test_list_str"
],
"metrics": [
"metrics.bleu"
],
"outputs": [
"test_list",
"code"
],
"type": "form_task"
},
"templates": {
"items": [
{
"input_format": "\"\"\"{text}\n\n{test_list_str}\"\"\"",
"output_format": "{code}",
"type": "input_output_template"
}
],
"type": "templates_list"
},
"type": "task_card"
}
Explanation about TaskCardΒΆ
TaskCard delineates the phases in transforming the source dataset into a model-input, and specifies the metrics for evaluation of model-output.
- Attributes:
loader: specifies the source address and the loading operator that can access that source and transform it into a unitxt multistream.
preprocess_steps: list of unitxt operators to process the data source into a model-input.
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.
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.
Explanation about FormTaskΒΆ
FormTask 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β
Explanation about JoinStrΒΆ
Joins a list of strings (contents of a field), similar to str.join().
- Args:
separator (str): text to put between values
Explanation about InputOutputTemplateΒΆ
Generate field βsourceβ from fields designated as input, and fields βtargetβ and βreferencesβ from fields designated as output, of the processed instance.
Args specify the formatting strings with which to glue together the input and output designated fields of the processed instance into one string (βsourceβ and βtargetβ), and into a list of strings (βreferencesβ).
References: metrics.bleu
Read more about catalog usage here.