Skip to content

Commit

Permalink
test in scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Roni Friedman-Melamed <[email protected]>
  • Loading branch information
Roni-Friedman committed Nov 7, 2024
1 parent d918732 commit 7c9e44c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
File renamed without changes.
6 changes: 2 additions & 4 deletions src/instructlab/eval/mmlu.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def run(self, server_url: str | None = None) -> tuple:
agg_score: float = 0.0

results = self._run_mmlu(server_url)
for task, result in results['results'].items():
for task, result in results["results"].items():
agg_score += float(result["acc,none"])
individual_scores[task] = {
"score": float(result["acc,none"]),
Expand All @@ -153,9 +153,7 @@ def run(self, server_url: str | None = None) -> tuple:

return overall_score, individual_scores

def _run_mmlu(
self, server_url: str | None = None
) -> dict:
def _run_mmlu(self, server_url: str | None = None) -> dict:
if server_url is not None:
# Requires lm_eval >= 0.4.4
model_args = f"base_url={server_url}/completions,model={self.model_path},tokenizer_backend=huggingface"
Expand Down

0 comments on commit 7c9e44c

Please sign in to comment.