Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,13 @@ optional-dependencies.extra = [
# quantization:
"bitsandbytes>=0.45.2,<0.48; sys_platform=='linux' or sys_platform=='win32'",
# litgpt.evaluate:
"datasets>=2.18,<4",
"datasets>=2.18,<5",
# download:
"huggingface-hub[hf-transfer]>=0.21",
"litdata==0.2.51",
# litgpt.deploy:
"litserve>0.2",
# lm-eval: pinned <0.4.9.1 due to trust_remote_code issues with datasets like logiqa.
# See: https://github.com/EleutherAI/lm-evaluation-harness/issues/3171
"lm-eval>=0.4.2,<0.4.9.1",
"lm-eval>=0.4.2",
# litgpt.data.prepare_starcoder.py:
"pandas>=1.9",
"pyarrow>=15.0.2",
Expand Down
8 changes: 4 additions & 4 deletions tests/test_evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_evaluate_script(tmp_path):
device=None,
dtype=torch.float32,
limit=5,
tasks="logiqa",
tasks="hellaswag",
batch_size=0, # Test for non-positive integer
)
assert "batch_size must be a positive integer, 'auto', or in the format 'auto:N'." in str(excinfo.value)
Expand All @@ -46,7 +46,7 @@ def test_evaluate_script(tmp_path):
device=None,
dtype=torch.float32,
limit=5,
tasks="logiqa",
tasks="hellaswag",
batch_size="invalid", # Test for invalid string
)
assert "batch_size must be a positive integer, 'auto', or in the format 'auto:N'." in str(excinfo.value)
Expand All @@ -59,12 +59,12 @@ def test_evaluate_script(tmp_path):
device=None,
dtype=torch.float32,
limit=5,
tasks="logiqa",
tasks="hellaswag",
batch_size=1, # Valid case
)
stdout = stdout.getvalue()
assert (tmp_path / "out_dir" / "results.json").is_file()
assert "logiqa" in stdout
assert "hellaswag" in stdout
assert "Metric" in stdout
assert "Loading checkpoint shards" not in stdout

Expand Down
Loading