Skip to content

Commit

Permalink
Fixing defaultdict -> collections.defaultdict
Browse files Browse the repository at this point in the history
  • Loading branch information
gagika committed Jan 13, 2025
1 parent c1e9124 commit 53ec9a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MaxText/benchmarks/mmlu/mmlu_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 53ec9a3

Please sign in to comment.