From 53ec9a3d5ce0879ba275b2ed7e53043182ce9c2d Mon Sep 17 00:00:00 2001 From: Gagik Amirkhanyan Date: Mon, 13 Jan 2025 11:35:48 -0800 Subject: [PATCH] Fixing defaultdict -> collections.defaultdict --- MaxText/benchmarks/mmlu/mmlu_eval.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MaxText/benchmarks/mmlu/mmlu_eval.py b/MaxText/benchmarks/mmlu/mmlu_eval.py index 2e6e2e0af..6d729e8cf 100644 --- a/MaxText/benchmarks/mmlu/mmlu_eval.py +++ b/MaxText/benchmarks/mmlu/mmlu_eval.py @@ -176,8 +176,8 @@ def main(config): max_logging.log(f"Accuracy for subcategory '{subcat_label}': {acc:.4f}") # Calculate and print category accuracies - cat_correct = defaultdict(int) - cat_total = defaultdict(int) + cat_correct = collections.defaultdict(int) + cat_total = collections.defaultdict(int) for category_name, subcat_labels in categories.items(): for subcat_label in subcat_labels: