Skip to content

Commit

Permalink
Remove code to force lm_eval to work under Python 3.8 (#757)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei-Aksionov authored Nov 20, 2023
1 parent c85bf01 commit 9690b70
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion requirements-all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ zstandard # scripts/prepare_redpajama.py, scripts/prepare_starcoder.p
pandas # scripts/prepare_csv.py, scripts/prepare_starcoder.py
pyarrow # scripts/prepare_starcoder.py
# eval
git+https://github.com/EleutherAI/lm-evaluation-harness.git@master; python_version > '3.8'
git+https://github.com/EleutherAI/lm-evaluation-harness.git@115206dc89dad67b8beaa90051fb52db77f0a529
# scripts/prepare_slimpajama.py, scripts/prepare_starcoder.py, pretrain/tinyllama.py
lightning[data] @ git+https://github.com/Lightning-AI/lightning@4e72dcc8db6a0cbe94042ddbc310340556e8fee7
3 changes: 0 additions & 3 deletions tests/test_lm_eval_harness.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from lightning import Fabric


@RunIf(min_python="3.9")
@pytest.mark.xfail(raises=datasets.builder.DatasetGenerationError, strict=False) # avoid flakes
def test_run_eval(tmp_path, float_like):
from eval.lm_eval_harness import EvalHarnessBase
Expand Down Expand Up @@ -52,7 +51,6 @@ def test_run_eval(tmp_path, float_like):
}


@RunIf(min_python="3.9")
def test_eval_script(tmp_path, fake_checkpoint_dir, monkeypatch):
import eval.lm_eval_harness as module

Expand All @@ -78,7 +76,6 @@ def test_eval_script(tmp_path, fake_checkpoint_dir, monkeypatch):
assert (tmp_path / "results.json").read_text() == '{"foo": "test"}'


@RunIf(min_python="3.9")
def test_cli():
cli_path = Path(__file__).parent.parent / "eval" / "lm_eval_harness.py"
output = subprocess.check_output([sys.executable, cli_path, "-h"])
Expand Down

0 comments on commit 9690b70

Please sign in to comment.