Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed Apr 25, 2024
1 parent c816ab0 commit 7c425b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions litgpt/eval/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def prepare_results(results, save_filepath, print_results=True):
def convert_and_evaluate(
checkpoint_dir: Path,
tasks: Optional[str] = None,
out_dir: Optional[str] = None,
out_dir: Optional[Path] = None,
force_conversion: bool = False,
num_fewshot: Optional[int] = None,
batch_size: int = 1,
Expand All @@ -45,9 +45,7 @@ def convert_and_evaluate(
Saves to `checkpoint_dir`/evaluate by default.
force_conversion: Set to `True` to reconvert the model and override
an existing model.pth from a previous evaluation call.
tasks: CSV of task names to evaluate.
By default, the following tasks are used:
"hellaswag,truthfulqa_mc2,mmlu"
tasks: CSV of task names to evaluate. Example: "hellaswag,truthfulqa_mc2,mmlu"
num_fewshot: Number of examples in few-shot context.
batch_size: Batch size configuration.
device: Device to use for evaluation, for example, "cuda" or "cuda:0".
Expand Down
1 change: 1 addition & 0 deletions tests/test_evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def test_evaluate_script(tmp_path):
assert (tmp_path / "out_dir" / "results.json").is_file()
assert "mathqa" in stdout
assert "Metric" in stdout
assert "Loading checkpoint shards" not in stdout


@pytest.mark.parametrize("mode", ["file", "entrypoint"])
Expand Down

0 comments on commit 7c425b9

Please sign in to comment.