Skip to content

Commit

Permalink
Add docstrings to run methods
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Weinberg <[email protected]>
  • Loading branch information
nathan-weinberg committed Jun 17, 2024
1 parent 11ad758 commit 3eadb4d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/instructlab/eval/mmlu.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class MMLU_Evaluator(Evaluator):
Child class of an Evaluator for Massive Multitask Language Understanding (MMLU)
Attributes:
tasks list of tasks for MMLU to test the model with
tasks list of tasks for MMLU to test the model with
few_shots number of examples
batch_size number of GPUs
"""
Expand All @@ -23,6 +23,13 @@ def __init__(
self.batch_size = batch_size

def run(self) -> tuple:
"""
Runs MMLU evaluation
Returns:
overall_score MMLU score for the overall model evaluation
individual_scores Individual MMLU score for each task
"""
individual_scores: dict[str, float] = {}
overall_score: float = 0.0
return overall_score, individual_scores
Expand Down Expand Up @@ -54,6 +61,14 @@ def __init__(
self.batch_size = batch_size

def run(self) -> tuple:
"""
Runs PR MMLU evaluation
Returns:
overall_score PR MMLU score for the overall model evaluation
individual_scores Individual PR MMLU scores for each task
qa_pairs Question and answer pairs from the evaluation
"""
individual_scores: dict[str, float] = {}
overall_score: float = 0.0
qa_pairs: list[tuple] = []
Expand Down
14 changes: 14 additions & 0 deletions src/instructlab/eval/mtbench.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ def __init__(self, model_path, server_url: str) -> None:
self.server_url = server_url

def run(self) -> tuple:
"""
Runs MT-Bench evaluation
Returns:
overall_score MT-Bench score for the overall model evaluation
qa_pairs Question and answer pairs from the evaluation
"""
overall_score: float = 0.0
qa_pairs: list[tuple] = []
return overall_score, qa_pairs
Expand All @@ -37,6 +44,13 @@ def __init__(self, model_path, server_url: str, questions: str) -> None:
self.questions = questions

def run(self) -> tuple:
"""
Runs PR-Bench evaluation
Returns:
overall_score MT-Bench score for the overall model evaluation
qa_pairs Question and answer pairs from the evaluation
"""
overall_score = 0.0
qa_pairs: list[tuple] = []
return overall_score, qa_pairs

0 comments on commit 3eadb4d

Please sign in to comment.