diff --git a/llms/mlx_lm/evaluate.py b/llms/mlx_lm/evaluate.py index 0efae2fe..ff49a1bd 100644 --- a/llms/mlx_lm/evaluate.py +++ b/llms/mlx_lm/evaluate.py @@ -4,10 +4,10 @@ import argparse import json import logging import os +from importlib.metadata import version from pathlib import Path from typing import Optional -import lm_eval import mlx.core as mx import mlx.nn as nn import numpy as np @@ -340,10 +340,9 @@ def main(): fewshot_random_seed=args.seed, ) - filename = f"eval_{args.model.replace('/', '_')}_{('_'.join(args.tasks))}_{args.num_shots:02d}.json" + filename = f"eval_{args.model.replace('/', '_')}_{('_'.join(args.tasks))}_{args.num_shots:02d}_v_{version('lm_eval')}.json" output_path = Path(args.output_dir) / filename output_path.write_text(json.dumps(results["results"], indent=4)) print("Results:") for result in results["results"].values(): print(json.dumps(result, indent=4)) - print()