diff --git a/prepare/cards/mmmu.py b/prepare/cards/mmmu.py index 11005459f4..52ce5b5ca6 100644 --- a/prepare/cards/mmmu.py +++ b/prepare/cards/mmmu.py @@ -1,7 +1,11 @@ from unitxt.blocks import LoadHF, TaskCard from unitxt.catalog import add_to_catalog from unitxt.collections_operators import Filter -from unitxt.operators import ListFieldValues, MapValues +from unitxt.operators import ( + ExecuteExpression, + ListFieldValues, + MapValues, +) from unitxt.processors import LiteralEval, Lower from unitxt.splitters import RenameSplits from unitxt.string_operators import MapReplace @@ -40,6 +44,8 @@ "Sociology", ] +mapping = {"A": 0, "B": 1, "C": 2, "D": 3, "E": 4, "F": 5, "G": 6, "H": 7, "I": 8} + for name in config_names: card = TaskCard( loader=LoadHF( @@ -51,6 +57,14 @@ fields=[f"image_{i}" for i in range(1, 8)], to_field="media/images" ), Filter(field="media/images", values=[None]), + ExecuteExpression( + expression="options if options != '[]' else '[\"'+answer+'\"]'", + to_field="options", + ), + ExecuteExpression( + expression="'A' if options == '[\"'+answer+'\"]' else answer", + to_field="answer", + ), MapReplace( field_to_field={"question": "question", "options": "choices"}, mapping={ @@ -62,7 +76,7 @@ Lower(field="subfield", to_field="topic"), MapValues( field="answer", - mapping={"A": 0, "B": 1, "C": 2, "D": 3, "E": 4, "?": None}, + mapping=mapping, ), ], task="tasks.qa.multiple_choice.with_topic", diff --git a/src/unitxt/catalog/cards/mmmu/accounting.json b/src/unitxt/catalog/cards/mmmu/accounting.json index abe0958bb8..5bc4b67c41 100644 --- a/src/unitxt/catalog/cards/mmmu/accounting.json +++ b/src/unitxt/catalog/cards/mmmu/accounting.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/agriculture.json b/src/unitxt/catalog/cards/mmmu/agriculture.json index 1a78a73478..f99726a2c2 100644 --- a/src/unitxt/catalog/cards/mmmu/agriculture.json +++ b/src/unitxt/catalog/cards/mmmu/agriculture.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/architecture_and_engineering.json b/src/unitxt/catalog/cards/mmmu/architecture_and_engineering.json index a1cc754ee9..ca69ddfa4b 100644 --- a/src/unitxt/catalog/cards/mmmu/architecture_and_engineering.json +++ b/src/unitxt/catalog/cards/mmmu/architecture_and_engineering.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/art.json b/src/unitxt/catalog/cards/mmmu/art.json index b02abeb36c..c057c23ab5 100644 --- a/src/unitxt/catalog/cards/mmmu/art.json +++ b/src/unitxt/catalog/cards/mmmu/art.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/art_theory.json b/src/unitxt/catalog/cards/mmmu/art_theory.json index f4dac2cadf..bcf253c3e5 100644 --- a/src/unitxt/catalog/cards/mmmu/art_theory.json +++ b/src/unitxt/catalog/cards/mmmu/art_theory.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/basic_medical_science.json b/src/unitxt/catalog/cards/mmmu/basic_medical_science.json index 9af96071e4..06e16c746c 100644 --- a/src/unitxt/catalog/cards/mmmu/basic_medical_science.json +++ b/src/unitxt/catalog/cards/mmmu/basic_medical_science.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/biology.json b/src/unitxt/catalog/cards/mmmu/biology.json index a1735098fb..e9fdfcb7c0 100644 --- a/src/unitxt/catalog/cards/mmmu/biology.json +++ b/src/unitxt/catalog/cards/mmmu/biology.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/chemistry.json b/src/unitxt/catalog/cards/mmmu/chemistry.json index 50b26e6ea0..5f196528fc 100644 --- a/src/unitxt/catalog/cards/mmmu/chemistry.json +++ b/src/unitxt/catalog/cards/mmmu/chemistry.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/clinical_medicine.json b/src/unitxt/catalog/cards/mmmu/clinical_medicine.json index 329c2dcf59..236195f773 100644 --- a/src/unitxt/catalog/cards/mmmu/clinical_medicine.json +++ b/src/unitxt/catalog/cards/mmmu/clinical_medicine.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/computer_science.json b/src/unitxt/catalog/cards/mmmu/computer_science.json index 396ea95c62..34991d8200 100644 --- a/src/unitxt/catalog/cards/mmmu/computer_science.json +++ b/src/unitxt/catalog/cards/mmmu/computer_science.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/design.json b/src/unitxt/catalog/cards/mmmu/design.json index 52b8f2b022..18cf7dcd74 100644 --- a/src/unitxt/catalog/cards/mmmu/design.json +++ b/src/unitxt/catalog/cards/mmmu/design.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/diagnostics_and_laboratory_medicine.json b/src/unitxt/catalog/cards/mmmu/diagnostics_and_laboratory_medicine.json index 84225d6a0e..91bcbb57eb 100644 --- a/src/unitxt/catalog/cards/mmmu/diagnostics_and_laboratory_medicine.json +++ b/src/unitxt/catalog/cards/mmmu/diagnostics_and_laboratory_medicine.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/economics.json b/src/unitxt/catalog/cards/mmmu/economics.json index 8f7a690feb..12b4e0e325 100644 --- a/src/unitxt/catalog/cards/mmmu/economics.json +++ b/src/unitxt/catalog/cards/mmmu/economics.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/electronics.json b/src/unitxt/catalog/cards/mmmu/electronics.json index 8c709f00b1..3d21d43b68 100644 --- a/src/unitxt/catalog/cards/mmmu/electronics.json +++ b/src/unitxt/catalog/cards/mmmu/electronics.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/energy_and_power.json b/src/unitxt/catalog/cards/mmmu/energy_and_power.json index 81c2bdfcf4..e788d796df 100644 --- a/src/unitxt/catalog/cards/mmmu/energy_and_power.json +++ b/src/unitxt/catalog/cards/mmmu/energy_and_power.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/finance.json b/src/unitxt/catalog/cards/mmmu/finance.json index 52a916d0d0..3d4369d212 100644 --- a/src/unitxt/catalog/cards/mmmu/finance.json +++ b/src/unitxt/catalog/cards/mmmu/finance.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/geography.json b/src/unitxt/catalog/cards/mmmu/geography.json index 2abc9048f4..0ad9566e36 100644 --- a/src/unitxt/catalog/cards/mmmu/geography.json +++ b/src/unitxt/catalog/cards/mmmu/geography.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/history.json b/src/unitxt/catalog/cards/mmmu/history.json index a54f9a7896..8a73a8a439 100644 --- a/src/unitxt/catalog/cards/mmmu/history.json +++ b/src/unitxt/catalog/cards/mmmu/history.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/literature.json b/src/unitxt/catalog/cards/mmmu/literature.json index c3c4c9507e..a40f26d922 100644 --- a/src/unitxt/catalog/cards/mmmu/literature.json +++ b/src/unitxt/catalog/cards/mmmu/literature.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/manage.json b/src/unitxt/catalog/cards/mmmu/manage.json index 9941f90f45..dc0290d9f6 100644 --- a/src/unitxt/catalog/cards/mmmu/manage.json +++ b/src/unitxt/catalog/cards/mmmu/manage.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/marketing.json b/src/unitxt/catalog/cards/mmmu/marketing.json index b917e8826d..8467dc6cfe 100644 --- a/src/unitxt/catalog/cards/mmmu/marketing.json +++ b/src/unitxt/catalog/cards/mmmu/marketing.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/materials.json b/src/unitxt/catalog/cards/mmmu/materials.json index 5c589dbd60..e82ce62c17 100644 --- a/src/unitxt/catalog/cards/mmmu/materials.json +++ b/src/unitxt/catalog/cards/mmmu/materials.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/math.json b/src/unitxt/catalog/cards/mmmu/math.json index 2f1b6a8d7c..c526d70919 100644 --- a/src/unitxt/catalog/cards/mmmu/math.json +++ b/src/unitxt/catalog/cards/mmmu/math.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/mechanical_engineering.json b/src/unitxt/catalog/cards/mmmu/mechanical_engineering.json index 72539fcbcb..ddfbb197ef 100644 --- a/src/unitxt/catalog/cards/mmmu/mechanical_engineering.json +++ b/src/unitxt/catalog/cards/mmmu/mechanical_engineering.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/music.json b/src/unitxt/catalog/cards/mmmu/music.json index 7a3ac95c92..1acf95c47d 100644 --- a/src/unitxt/catalog/cards/mmmu/music.json +++ b/src/unitxt/catalog/cards/mmmu/music.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/pharmacy.json b/src/unitxt/catalog/cards/mmmu/pharmacy.json index 143f323f99..93be2b79cb 100644 --- a/src/unitxt/catalog/cards/mmmu/pharmacy.json +++ b/src/unitxt/catalog/cards/mmmu/pharmacy.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/physics.json b/src/unitxt/catalog/cards/mmmu/physics.json index 3b433b6437..d990bbc90a 100644 --- a/src/unitxt/catalog/cards/mmmu/physics.json +++ b/src/unitxt/catalog/cards/mmmu/physics.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/psychology.json b/src/unitxt/catalog/cards/mmmu/psychology.json index 1bdb6bb679..bc116cbaaf 100644 --- a/src/unitxt/catalog/cards/mmmu/psychology.json +++ b/src/unitxt/catalog/cards/mmmu/psychology.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/public_health.json b/src/unitxt/catalog/cards/mmmu/public_health.json index 87ad264852..24b476f09c 100644 --- a/src/unitxt/catalog/cards/mmmu/public_health.json +++ b/src/unitxt/catalog/cards/mmmu/public_health.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ], diff --git a/src/unitxt/catalog/cards/mmmu/sociology.json b/src/unitxt/catalog/cards/mmmu/sociology.json index 27f654f6ca..399a8f90fd 100644 --- a/src/unitxt/catalog/cards/mmmu/sociology.json +++ b/src/unitxt/catalog/cards/mmmu/sociology.json @@ -36,6 +36,16 @@ null ] }, + { + "__type__": "execute_expression", + "expression": "options if options != '[]' else '[\"'+answer+'\"]'", + "to_field": "options" + }, + { + "__type__": "execute_expression", + "expression": "'A' if options == '[\"'+answer+'\"]' else answer", + "to_field": "answer" + }, { "__type__": "map_replace", "field_to_field": { @@ -70,7 +80,10 @@ "C": 2, "D": 3, "E": 4, - "?": null + "F": 5, + "G": 6, + "H": 7, + "I": 8 } } ],