Skip to content

Commit b5e84f9

Browse files
committed
fix dummy; fix builds
1 parent 31dce05 commit b5e84f9

File tree

4 files changed

+40
-22
lines changed

4 files changed

+40
-22
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,6 @@ examples/wandb/
4545

4646
# PyInstaller
4747
*.spec
48+
49+
#uv
50+
uv.lock

lm_eval/evaluator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
import numpy as np
1111

1212
import lm_eval.api.metrics
13+
import lm_eval.api.model
1314
import lm_eval.api.registry
1415
import lm_eval.api.task
15-
import lm_eval.models
1616
from lm_eval.caching.cache import delete_cache
1717
from lm_eval.evaluator_utils import (
1818
consolidate_group_results,
@@ -387,7 +387,7 @@ def _adjust_config(task_dict):
387387
"model_args": model_args,
388388
}
389389
# add more detailed model info if available
390-
if isinstance(lm, lm_eval.models.huggingface.HFLM):
390+
if hasattr(lm, "get_model_info"):
391391
results["config"].update(lm.get_model_info())
392392
# add info about execution
393393
results["config"].update(

lm_eval/models/dummy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
@register_model("dummy")
1010
class DummyLM(LM):
11-
def __init__(self) -> None:
11+
def __init__(self, *args, **kwargs) -> None:
1212
super().__init__()
1313

1414
@classmethod

pyproject.toml

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ classifiers = [
1919
requires-python = ">=3.10"
2020
license = { "text" = "MIT" }
2121
dependencies = [
22-
"accelerate>=0.26.0",
2322
"evaluate",
2423
"datasets>=2.16.0",
2524
"evaluate>=0.4.0",
@@ -32,9 +31,6 @@ dependencies = [
3231
"sacrebleu>=1.5.0",
3332
"scikit-learn>=0.24.1",
3433
"sqlitedict",
35-
"torch>=1.8",
36-
"tqdm-multiprocess",
37-
"transformers>=4.1",
3834
"zstandard",
3935
"dill",
4036
"word2number",
@@ -57,37 +53,40 @@ Homepage = "https://github.com/EleutherAI/lm-evaluation-harness"
5753
Repository = "https://github.com/EleutherAI/lm-evaluation-harness"
5854

5955
[project.optional-dependencies]
60-
acpbench = ["lark>=1.1.9", "tarski[clingo]==0.8.2", "pddl==0.4.2", "kstar-planner==1.4.2"]
56+
# Model backend dependencies
6157
api = ["requests", "aiohttp", "tenacity", "tqdm", "tiktoken"]
62-
audiolm_qwen = ["librosa", "soundfile"]
63-
dev = ["pytest", "pytest-cov", "pytest-xdist", "pre-commit", "requests", "aiohttp", "tenacity", "tqdm", "tiktoken", "sentencepiece"]
58+
hf = ["transformers>=4.1","torch>=1.8", "accelerate>=0.26.0"]
59+
vllm = ["vllm>=0.4.2"]
6460
gptq = ["auto-gptq[triton]>=0.6.0"]
6561
gptqmodel = ["gptqmodel>=1.0.9"]
66-
hf_transfer = ["hf_transfer"]
62+
ipex = ["optimum"]
6763
ibm_watsonx_ai = ["ibm_watsonx_ai>=1.1.22", "python-dotenv"]
64+
#mamba = ["mamba_ssm", "causal-conv1d==1.0.2", "torch"] # build error
65+
neuronx = ["optimum[neuronx]>0.0.1"]
66+
optimum = ["optimum[openvino]"]
67+
sparsify = ["sparsify"]
68+
sae_lens = ["sae_lens"]
69+
# Task specific dependencies
70+
acpbench = ["lark>=1.1.9", "tarski[clingo]==0.8.2", "pddl==0.4.2", "kstar-planner==1.4.2"]
71+
audiolm_qwen = ["librosa", "soundfile"]
72+
dev = ["pytest", "pytest-cov", "pytest-xdist", "pre-commit", "requests", "aiohttp", "tenacity", "tqdm", "tiktoken", "sentencepiece"]
73+
hf_transfer = ["hf_transfer"]
6874
ifeval = ["langdetect", "immutabledict", "nltk>=3.9.1"]
69-
ipex = ["optimum"]
7075
japanese_leaderboard = ["emoji==2.14.0", "neologdn==0.5.3", "fugashi[unidic-lite]", "rouge_score>=0.1.2"]
7176
longbench = ["jieba", "fuzzywuzzy", "rouge"]
7277
libra = ["pymorphy2"]
73-
mamba = ["mamba_ssm", "causal-conv1d==1.0.2", "torch"]
7478
math = ["sympy>=1.12", "antlr4-python3-runtime==4.11", "math_verify[antlr4_11_0]"]
7579
multilingual = ["nagisa>=0.2.7", "jieba>=0.42.1", "pycountry"]
76-
neuronx = ["optimum[neuronx]"]
77-
optimum = ["optimum[openvino]"]
78-
promptsource = ["promptsource>=0.2.3"]
80+
#promptsource = [
81+
# "promptsource>=0.2.3 ; python_version <= '3.12'",
82+
#]
7983
ruler = ["nltk", "wonderwords", "scipy"]
80-
sae_lens = ["sae_lens"]
8184
sentencepiece = ["sentencepiece>=0.1.98"]
82-
sparsify = ["sparsify"]
8385
discrim_eval = ["statsmodels==0.14.4"]
84-
testing = ["pytest", "pytest-cov", "pytest-xdist"]
8586
unitxt = ["unitxt==1.22.0"]
86-
vllm = ["vllm>=0.4.2"]
8787
wandb = ["wandb>=0.16.3", "pandas", "numpy"]
8888
zeno = ["pandas", "zeno-client"]
8989
tasks = [
90-
"lm_eval[acpbench]",
9190
"lm_eval[discrim_eval]",
9291
"lm_eval[ifeval]",
9392
"lm_eval[japanese_leaderboard]",
@@ -99,6 +98,22 @@ tasks = [
9998
"lm_eval[ruler]",
10099
]
101100

101+
[tool.uv]
102+
conflicts = [
103+
[
104+
{ extra = "acpbench" },
105+
{ extra = "math" },
106+
],
107+
[
108+
{ extra = "acpbench" },
109+
{ extra = "tasks" },
110+
],
111+
[
112+
{ extra = "gptq" },
113+
{ extra = "vllm" },
114+
],
115+
]
116+
102117
[tool.pymarkdown]
103118
plugins.md013.enabled = false # line-length
104119
plugins.md024.allow_different_nesting = true # no-duplicate-headers
@@ -120,5 +135,5 @@ known-first-party = ["lm_eval"]
120135

121136
[dependency-groups]
122137
dev = [
123-
"api", "dev", "sentencepiece"
138+
"lm_eval[api]", "lm_eval[dev]", "lm_eval[hf]","sentencepiece"
124139
]

0 commit comments

Comments
 (0)