Skip to content

Only support newest versions of lm-eval #556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2024
Merged
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
22 changes: 4 additions & 18 deletions eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,11 @@
torch._inductor.config.triton.cudagraphs = True
torch._dynamo.config.cache_size_limit = 100000

try:
import lm_eval
import lm_eval

lm_eval_available = True
except:
lm_eval_available = False


if lm_eval_available:
try: # lm_eval version 0.4
from lm_eval.evaluator import evaluate
from lm_eval.models.huggingface import HFLM as eval_wrapper
from lm_eval.tasks import get_task_dict
except: # lm_eval version 0.3
from lm_eval import base, evaluator, tasks

eval_wrapper = base.BaseLM
get_task_dict = tasks.get_task_dict
evaluate = evaluator.evaluate
from lm_eval.evaluator import evaluate
from lm_eval.models.huggingface import HFLM as eval_wrapper
from lm_eval.tasks import get_task_dict


def setup_cache_padded_seq_input_pos_max_seq_length_for_prefill(
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ snakeviz
sentencepiece
numpy
gguf
lm-eval
lm-eval==0.4
blobfile

# Build tools
Expand Down