Skip to content

Commit

Permalink
fix lighteval error when not using lighteval
Browse files Browse the repository at this point in the history
  • Loading branch information
mlabonne authored Mar 25, 2024
1 parent 4776746 commit a7dcb8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import argparse
import time

from lighteval.evaluator import make_results_table

from llm_autoeval.table import make_table, make_final_table
from llm_autoeval.upload import upload_to_github_gist

Expand Down Expand Up @@ -67,7 +65,7 @@ def _make_autoeval_summary(directory: str, elapsed_time: float) -> str:


def _get_result_dict(directory: str) -> dict:
"""Walk down driectories to get JSON path"""
"""Walk down directories to get JSON path"""

for root, dirs, files in os.walk(directory):
for file in files:
Expand All @@ -77,6 +75,8 @@ def _get_result_dict(directory: str) -> dict:


def _make_lighteval_summary(directory: str, elapsed_time: float) -> str:
from lighteval.evaluator import make_results_table

result_dict = _get_result_dict(directory)
final_table = make_results_table(result_dict)
summary = f"## {MODEL_ID.split('/')[-1]} - {BENCHMARK.capitalize()}\n\n"
Expand Down

0 comments on commit a7dcb8f

Please sign in to comment.