Skip to content

Commit ff9c84a

Browse files
joecummingsmori360
authored andcommitted
Allow higher version of lm-eval (meta-pytorch#2165)
1 parent a5d12b1 commit ff9c84a

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

.github/workflows/gpu_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Install remaining dependencies
5454
run: |
5555
python -m pip install -e ".[dev]"
56-
python -m pip install lm-eval==0.4.5
56+
python -m pip install lm-eval>=0.4.5
5757
- name: Run recipe and unit tests with coverage
5858
run: pytest tests --ignore tests/torchtune/modules/_export --with-integration --cov=. --cov-report=xml --durations=20 -vv
5959
- name: Upload Coverage to Codecov

.github/workflows/recipe_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: |
4343
python -m pip install torch torchvision torchao
4444
python -m pip install -e ".[dev]"
45-
python -m pip install lm-eval==0.4.5
45+
python -m pip install lm-eval>=0.4.5
4646
- name: Run recipe tests with coverage
4747
run: pytest tests -m integration_test --cov=. --cov-report=xml --durations=20 -vv
4848
- name: Upload Coverage to Codecov

.github/workflows/regression_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
- name: Install remaining dependencies
5959
run: |
6060
python -m pip install -e ".[dev]"
61-
python -m pip install lm-eval==0.4.5
61+
python -m pip install lm-eval>=0.4.5
6262
- name: Run regression tests with coverage
6363
run: pytest tests -m slow_integration_test --silence-s3-logs --cov=. --cov-report=xml --durations=20 -vv
6464
- name: Upload Coverage to Codecov

recipes/configs/llama3_2_vision/11B_evaluation.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# This config assumes that you've run the following command before launching:
44
# tune download meta-llama/Llama-3.2-11B-Vision-Instruct --output-dir /tmp/Llama-3.2-11B-Vision-Instruct --ignore-patterns "original/consolidated*"
55
#
6-
# It also assumes that you've downloaded the EleutherAI Eval Harness (v0.4.5):
7-
# pip install lm_eval==0.4.5
6+
# It also assumes that you've downloaded the EleutherAI Eval Harness (v0.4.5 or higher):
7+
# pip install lm_eval
88
#
99
# To launch, run the following command from root torchtune directory:
1010
# tune run eleuther_eval --config llama3_2_vision/11B_evaluation

recipes/eleuther_eval.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,10 @@ def __init__(self, cfg: DictConfig) -> None:
441441
# Double check we have the right Eval Harness version
442442
from importlib.metadata import version
443443

444-
if version("lm-eval") != "0.4.5":
444+
if version("lm-eval") < "0.4.5":
445445
raise RuntimeError(
446-
"This recipe requires EleutherAI Eval Harness v0.4.5. "
447-
"Please install with `pip install lm-eval==0.4.5`"
446+
"This recipe requires EleutherAI Eval Harness v0.4.5 or higher. "
447+
"Please install with `pip install lm-eval>=0.4.5`"
448448
)
449449

450450
# General variable initialization

tests/recipes/test_eleuther_eval.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ def test_eval_recipe_errors_without_lm_eval(self, monkeypatch, tmpdir):
132132
monkeypatch.setattr(sys, "argv", cmd)
133133
with pytest.raises(
134134
RuntimeError,
135-
match="This recipe requires EleutherAI Eval Harness v0.4.5. "
136-
"Please install with `pip install lm-eval==0.4.5`",
135+
match="This recipe requires EleutherAI Eval Harness v0.4.5 or higher. "
136+
"Please install with `pip install lm-eval>=0.4.5`",
137137
):
138138
runpy.run_path(TUNE_PATH, run_name="__main__")
139139

0 commit comments

Comments
 (0)