Spaces:
Sleeping
Sleeping
Update dataset_previews.py
Browse files- dataset_previews.py +2 -2
dataset_previews.py
CHANGED
@@ -58,7 +58,7 @@ def calculate_dataset_statistics():
|
|
58 |
"options_distribution": {10: 12032}
|
59 |
}
|
60 |
|
61 |
-
def mmlupro_dataset_preview() -> Dict[str, Any]:
|
62 |
"""
|
63 |
Generate or retrieve the MMLU-Pro dataset preview information.
|
64 |
|
@@ -68,7 +68,7 @@ def mmlupro_dataset_preview() -> Dict[str, Any]:
|
|
68 |
preview_file = "/data/mmlu_pro_dataset_preview_table.json"
|
69 |
|
70 |
# Check if preview file exists
|
71 |
-
if os.path.exists(preview_file):
|
72 |
try:
|
73 |
# Read existing preview file
|
74 |
with open(preview_file, 'r') as f:
|
|
|
58 |
"options_distribution": {10: 12032}
|
59 |
}
|
60 |
|
61 |
+
def mmlupro_dataset_preview(regenerate_preview=True) -> Dict[str, Any]:
|
62 |
"""
|
63 |
Generate or retrieve the MMLU-Pro dataset preview information.
|
64 |
|
|
|
68 |
preview_file = "/data/mmlu_pro_dataset_preview_table.json"
|
69 |
|
70 |
# Check if preview file exists
|
71 |
+
if not regenerate_preview and os.path.exists(preview_file):
|
72 |
try:
|
73 |
# Read existing preview file
|
74 |
with open(preview_file, 'r') as f:
|