-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added fix split, gitignore and download mmlu script
- Loading branch information
1 parent
8d3a047
commit e19b9e9
Showing
4 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/mmlu_pro_data |
27 changes: 27 additions & 0 deletions
27
end-to-end-use-cases/prompt-migration/benchmarks/download_mmlu_pro.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from datasets import load_dataset | ||
import pandas as pd | ||
import os | ||
|
||
def download_mmlu_pro(): | ||
# Create output directory if it doesn't exist | ||
output_dir = "mmlu_pro_data" | ||
os.makedirs(output_dir, exist_ok=True) | ||
|
||
# Load the dataset | ||
dataset = load_dataset("TIGER-Lab/MMLU-Pro") | ||
|
||
# Convert each split to CSV | ||
for split in dataset.keys(): | ||
# Convert to pandas DataFrame | ||
df = pd.DataFrame(dataset[split]) | ||
|
||
# Save to CSV | ||
output_path = os.path.join(output_dir, f"mmlu_pro_{split}.csv") | ||
df.to_csv(output_path, index=False) | ||
print(f"Saved {split} split to {output_path}") | ||
print(f"Number of examples in {split}: {len(df)}") | ||
|
||
if __name__ == "__main__": | ||
print("Downloading MMLU-Pro dataset...") | ||
download_mmlu_pro() | ||
print("Download complete!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters