squad

Note

ID: catalog.metrics.squad | Type: MetricPipeline

{
    "main_score": "f1",
    "metric": {
        "hf_metric_name": "squad",
        "main_score": "f1",
        "scale": 100.0,
        "scaled_fields": [
            "f1",
            "exact_match"
        ],
        "type": "huggingface_metric"
    },
    "preprocess_steps": [
        {
            "type": "add_id"
        },
        {
            "fields": {
                "prediction_template": {
                    "id": "ID",
                    "prediction_text": "PRED"
                },
                "reference_template": {
                    "answers": {
                        "answer_start": [
                            -1
                        ],
                        "text": "REF"
                    },
                    "id": "ID"
                }
            },
            "type": "add_fields",
            "use_deepcopy": true
        },
        {
            "field_to_field": [
                [
                    "references",
                    "reference_template/answers/text"
                ],
                [
                    "prediction",
                    "prediction_template/prediction_text"
                ],
                [
                    "id",
                    "prediction_template/id"
                ],
                [
                    "id",
                    "reference_template/id"
                ]
            ],
            "type": "copy_fields",
            "use_query": true
        },
        {
            "field_to_field": [
                [
                    "reference_template",
                    "references"
                ],
                [
                    "prediction_template",
                    "prediction"
                ]
            ],
            "type": "copy_fields",
            "use_query": true
        }
    ],
    "type": "metric_pipeline"
}