vision/m4/models/vllama3/evaluation_classification_in_context_vllama3.py [2707:2814]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    dataset_name: str = "HuggingFaceM4/VisDial_modif_support_query_sets"
    metric_name: str = "UnfoldedClassificationMetrics"
    metric_kwargs = {
        "metrics": [
            ClassifMetrics.NDCG,
        ]
    }
    default_query_split_name: str = "validation_query_set"
    default_support_split_name: str = "validation_support_set"
    validation_query_split_name: str = "validation_query_set"
    validation_support_split_name: str = "validation_support_set"
    test_query_split_name: str = "test_query_set"
    test_support_split_name: str = "test_support_set"
    label_column_name: str = "answer"
    tested_labels_column_name: str = "answer_options"
    image_column_names: List[str] = ["image"]
    context_column_names: List[str] = ["context", "caption"]
    relevance_scores_column_name: str = "relevance_scores"
    length_normalize: bool = False
    prompt_templates_dict = {
        0: {
            "prefix": None,
            "example": "<image>Caption: {caption}. {context}{class_name}.",
        },
        1: {
            "prefix": None,
            "example": "<image>{caption}. {context}{class_name}.",
        },
        2: {
            "prefix": None,
            "example": "<image>Image description: {caption}. {context}{class_name}.",
        },
        3: {
            "prefix": "{bos_token}Task: Given an image and a caption of it, answer the questions.\n",
            "example": "<image>Caption: {caption}. {context}{class_name}.",
        },
        4: {
            "prefix": "{bos_token}Task: Given an image and its description, answer the questions.\n",
            "example": "<image>Image description: {caption}. {context}{class_name}.",
        },
        5: {
            "prefix": "{bos_token}Task: Answer the questions based on the images and their descriptions.\n",
            "example": "<image>Image description: {caption}. {context}{class_name}.",
        },
        6: {
            "prefix": "{bos_token}Answer the questions based on the images and their descriptions.\n",
            "example": "<image>Caption: {caption}. {context}{class_name}.",
        },
        7: {
            "prefix": (
                "{bos_token}Instruction: provide an answer to the questions. Use the images and their captions to"
                " answer.\n"
            ),
            "example": "<image>Caption: {caption}. {context}{class_name}.",
        },
        8: {
            "prefix": "{bos_token}Instruction: Answer the questions using images and their captions.\n",
            "example": "<image>Caption: {caption}. {context}{class_name}.",
        },
        9: {
            "prefix": "{bos_token}Instruction: Answer the questions using images.\n",
            "example": "<image>Image description: {caption}. {context}{class_name}.",
        },
        10: {
            "prefix": None,
            "example": "<image>Caption: {caption}. {context}{class_name}.\n",
        },
        11: {
            "prefix": None,
            "example": "<image>{caption}. {context}{class_name}.\n",
        },
        12: {
            "prefix": None,
            "example": "<image>Image description: {caption}. {context}{class_name}.\n",
        },
        13: {
            "prefix": "{bos_token}Task: Given an image and a caption of it, answer the questions.\n",
            "example": "<image>Caption: {caption}. {context}{class_name}.\n",
        },
        14: {
            "prefix": "{bos_token}Task: Given an image and its description, answer the questions.\n",
            "example": "<image>Image description: {caption}. {context}{class_name}.\n",
        },
        15: {
            "prefix": "{bos_token}Task: Answer the questions based on the images and their descriptions.\n",
            "example": "<image>Image description: {caption}. {context}{class_name}.\n",
        },
        16: {
            "prefix": "{bos_token}Answer the questions based on the images and their descriptions.\n",
            "example": "<image>Caption: {caption}. {context}{class_name}.\n",
        },
        17: {
            "prefix": (
                "{bos_token}Instruction: provide an answer to the questions. Use the images and their captions to"
                " answer.\n"
            ),
            "example": "<image>Caption: {caption}. {context}{class_name}.\n",
        },
        18: {
            "prefix": "{bos_token}Instruction: Answer the questions using images and their captions.\n",
            "example": "<image>Caption: {caption}. {context}{class_name}.\n",
        },
        19: {
            "prefix": "{bos_token}Instruction: Answer the questions using images.\n",
            "example": "<image>Image description: {caption}. {context}{class_name}.\n",
        },
    }
    selected_prompt_template_id = 1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



vision/m4/models/vmistral/evaluation_classification_in_context_vmistral.py [2706:2813]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    dataset_name: str = "HuggingFaceM4/VisDial_modif_support_query_sets"
    metric_name: str = "UnfoldedClassificationMetrics"
    metric_kwargs = {
        "metrics": [
            ClassifMetrics.NDCG,
        ]
    }
    default_query_split_name: str = "validation_query_set"
    default_support_split_name: str = "validation_support_set"
    validation_query_split_name: str = "validation_query_set"
    validation_support_split_name: str = "validation_support_set"
    test_query_split_name: str = "test_query_set"
    test_support_split_name: str = "test_support_set"
    label_column_name: str = "answer"
    tested_labels_column_name: str = "answer_options"
    image_column_names: List[str] = ["image"]
    context_column_names: List[str] = ["context", "caption"]
    relevance_scores_column_name: str = "relevance_scores"
    length_normalize: bool = False
    prompt_templates_dict = {
        0: {
            "prefix": None,
            "example": "<image>Caption: {caption}. {context}{class_name}.",
        },
        1: {
            "prefix": None,
            "example": "<image>{caption}. {context}{class_name}.",
        },
        2: {
            "prefix": None,
            "example": "<image>Image description: {caption}. {context}{class_name}.",
        },
        3: {
            "prefix": "{bos_token}Task: Given an image and a caption of it, answer the questions.\n",
            "example": "<image>Caption: {caption}. {context}{class_name}.",
        },
        4: {
            "prefix": "{bos_token}Task: Given an image and its description, answer the questions.\n",
            "example": "<image>Image description: {caption}. {context}{class_name}.",
        },
        5: {
            "prefix": "{bos_token}Task: Answer the questions based on the images and their descriptions.\n",
            "example": "<image>Image description: {caption}. {context}{class_name}.",
        },
        6: {
            "prefix": "{bos_token}Answer the questions based on the images and their descriptions.\n",
            "example": "<image>Caption: {caption}. {context}{class_name}.",
        },
        7: {
            "prefix": (
                "{bos_token}Instruction: provide an answer to the questions. Use the images and their captions to"
                " answer.\n"
            ),
            "example": "<image>Caption: {caption}. {context}{class_name}.",
        },
        8: {
            "prefix": "{bos_token}Instruction: Answer the questions using images and their captions.\n",
            "example": "<image>Caption: {caption}. {context}{class_name}.",
        },
        9: {
            "prefix": "{bos_token}Instruction: Answer the questions using images.\n",
            "example": "<image>Image description: {caption}. {context}{class_name}.",
        },
        10: {
            "prefix": None,
            "example": "<image>Caption: {caption}. {context}{class_name}.\n",
        },
        11: {
            "prefix": None,
            "example": "<image>{caption}. {context}{class_name}.\n",
        },
        12: {
            "prefix": None,
            "example": "<image>Image description: {caption}. {context}{class_name}.\n",
        },
        13: {
            "prefix": "{bos_token}Task: Given an image and a caption of it, answer the questions.\n",
            "example": "<image>Caption: {caption}. {context}{class_name}.\n",
        },
        14: {
            "prefix": "{bos_token}Task: Given an image and its description, answer the questions.\n",
            "example": "<image>Image description: {caption}. {context}{class_name}.\n",
        },
        15: {
            "prefix": "{bos_token}Task: Answer the questions based on the images and their descriptions.\n",
            "example": "<image>Image description: {caption}. {context}{class_name}.\n",
        },
        16: {
            "prefix": "{bos_token}Answer the questions based on the images and their descriptions.\n",
            "example": "<image>Caption: {caption}. {context}{class_name}.\n",
        },
        17: {
            "prefix": (
                "{bos_token}Instruction: provide an answer to the questions. Use the images and their captions to"
                " answer.\n"
            ),
            "example": "<image>Caption: {caption}. {context}{class_name}.\n",
        },
        18: {
            "prefix": "{bos_token}Instruction: Answer the questions using images and their captions.\n",
            "example": "<image>Caption: {caption}. {context}{class_name}.\n",
        },
        19: {
            "prefix": "{bos_token}Instruction: Answer the questions using images.\n",
            "example": "<image>Image description: {caption}. {context}{class_name}.\n",
        },
    }
    selected_prompt_template_id = 1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



