def match(cls, responses, targets) -> int:
        """Exact match between targets and responses."""
        responses = str_to_list(responses)
        targets = str_to_list(targets)
        if len(targets) != len(responses):
            return 0
        correct = 0
        for res, tgt in zip(responses, targets):
            if isinstance(tgt, str):
                if res.lower() == tgt.lower():
                    correct += 1
            elif isinstance(tgt, Number) and isinstance(res, Number):
                if res == tgt:
                    correct += 1
            else:
                pass
        return correct / len(targets)
Exact match between targets and responses.
vlmeval/dataset/utils/megabench/scoring/sequence_equality.py