Unverified Commit 705bedd0 authored by Baber Abbasi's avatar Baber Abbasi Committed by GitHub
Browse files

unpin datasets; update pre-commit (#3316)

* update pre-commit

* unpin datasets
parent a1404f06
...@@ -2,18 +2,18 @@ ...@@ -2,18 +2,18 @@
exclude: ^tests/testdata/ exclude: ^tests/testdata/
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0 rev: v6.0.0
hooks: hooks:
- id: check-added-large-files - id: check-added-large-files
- id: check-ast - id: check-ast
- id: check-byte-order-marker - id: fix-byte-order-marker
- id: check-case-conflict - id: check-case-conflict
- id: check-json - id: check-json
- id: check-merge-conflict - id: check-merge-conflict
args: [--assume-in-merge] args: [ --assume-in-merge ]
- id: check-symlinks - id: check-symlinks
- id: check-yaml - id: check-yaml
args: ["--unsafe"] args: [ "--unsafe" ]
- id: destroyed-symlinks - id: destroyed-symlinks
- id: detect-private-key - id: detect-private-key
- id: end-of-file-fixer - id: end-of-file-fixer
...@@ -21,20 +21,17 @@ repos: ...@@ -21,20 +21,17 @@ repos:
always_run: false always_run: false
- id: requirements-txt-fixer - id: requirements-txt-fixer
- id: trailing-whitespace - id: trailing-whitespace
args: [--markdown-linebreak-ext=md] args: [ --markdown-linebreak-ext=md ]
- id: fix-byte-order-marker - id: fix-byte-order-marker
exclude: docs/CNAME exclude: docs/CNAME
- id: fix-encoding-pragma
args: [--remove]
- id: mixed-line-ending - id: mixed-line-ending
args: [--fix=lf] args: [ --fix=lf ]
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.2 rev: v0.13.2
hooks: hooks:
# Run the linter. # Run the linter.
- id: ruff - id: ruff-check
args: args: [ --fix ]
- --fix
# Run the formatter. # Run the formatter.
- id: ruff-format - id: ruff-format
- repo: https://github.com/codespell-project/codespell - repo: https://github.com/codespell-project/codespell
...@@ -47,10 +44,10 @@ repos: ...@@ -47,10 +44,10 @@ repos:
.*\.json|ignore.txt|lm_eval/tasks/.*|.*yaml|.*\.ipynb .*\.json|ignore.txt|lm_eval/tasks/.*|.*yaml|.*\.ipynb
)$ )$
args: [--check-filenames, --check-hidden, --ignore-words=ignore.txt] args: [ --check-filenames, --check-hidden, --ignore-words=ignore.txt ]
- repo: https://github.com/jackdewinter/pymarkdown - repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.30 rev: v0.9.32
hooks: hooks:
- id: pymarkdown - id: pymarkdown
exclude: ^(lm_eval/tasks/.*|docs/footguns\.md)$ exclude: ^(lm_eval/tasks/.*|docs/footguns\.md)$
args: [fix, -r] args: [ fix, -r ]
...@@ -437,6 +437,10 @@ def cli_evaluate(args: Union[argparse.Namespace, None] = None) -> None: ...@@ -437,6 +437,10 @@ def cli_evaluate(args: Union[argparse.Namespace, None] = None) -> None:
if vparse(datasets.__version__) < vparse("4.0.0"): if vparse(datasets.__version__) < vparse("4.0.0"):
datasets.config.HF_DATASETS_TRUST_REMOTE_CODE = True datasets.config.HF_DATASETS_TRUST_REMOTE_CODE = True
else:
eval_logger.warning(
"trust_remote_code and datasets scripts are no longer supported on datasets>=4.0.0. Skipping. If your task still requires this, please downgrade to datasets==3.6.0 or earlier."
)
if isinstance(args.model_args, dict): if isinstance(args.model_args, dict):
args.model_args["trust_remote_code"] = True args.model_args["trust_remote_code"] = True
......
...@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" ...@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
name = "lm_eval" name = "lm_eval"
version = "0.4.9.1" version = "0.4.9.1"
authors = [ authors = [
{name="EleutherAI", email="contact@eleuther.ai"} { name = "EleutherAI", email = "contact@eleuther.ai" }
] ]
description = "A framework for evaluating language models" description = "A framework for evaluating language models"
readme = "README.md" readme = "README.md"
...@@ -21,7 +21,7 @@ license = { "text" = "MIT" } ...@@ -21,7 +21,7 @@ license = { "text" = "MIT" }
dependencies = [ dependencies = [
"accelerate>=0.26.0", "accelerate>=0.26.0",
"evaluate", "evaluate",
"datasets>=2.16.0,<4.0", "datasets>=2.16.0",
"evaluate>=0.4.0", "evaluate>=0.4.0",
"jsonlines", "jsonlines",
"numexpr", "numexpr",
...@@ -68,8 +68,8 @@ ibm_watsonx_ai = ["ibm_watsonx_ai>=1.1.22", "python-dotenv"] ...@@ -68,8 +68,8 @@ ibm_watsonx_ai = ["ibm_watsonx_ai>=1.1.22", "python-dotenv"]
ifeval = ["langdetect", "immutabledict", "nltk>=3.9.1"] ifeval = ["langdetect", "immutabledict", "nltk>=3.9.1"]
ipex = ["optimum"] ipex = ["optimum"]
japanese_leaderboard = ["emoji==2.14.0", "neologdn==0.5.3", "fugashi[unidic-lite]", "rouge_score>=0.1.2"] japanese_leaderboard = ["emoji==2.14.0", "neologdn==0.5.3", "fugashi[unidic-lite]", "rouge_score>=0.1.2"]
longbench=["jieba", "fuzzywuzzy", "rouge"] longbench = ["jieba", "fuzzywuzzy", "rouge"]
libra=["pymorphy2"] libra = ["pymorphy2"]
mamba = ["mamba_ssm", "causal-conv1d==1.0.2", "torch"] mamba = ["mamba_ssm", "causal-conv1d==1.0.2", "torch"]
math = ["sympy>=1.12", "antlr4-python3-runtime==4.11", "math_verify[antlr4_11_0]"] math = ["sympy>=1.12", "antlr4-python3-runtime==4.11", "math_verify[antlr4_11_0]"]
multilingual = ["nagisa>=0.2.7", "jieba>=0.42.1", "pycountry"] multilingual = ["nagisa>=0.2.7", "jieba>=0.42.1", "pycountry"]
...@@ -115,10 +115,10 @@ lines-after-imports = 2 ...@@ -115,10 +115,10 @@ lines-after-imports = 2
known-first-party = ["lm_eval"] known-first-party = ["lm_eval"]
[tool.ruff.lint.extend-per-file-ignores] [tool.ruff.lint.extend-per-file-ignores]
"__init__.py" = ["F401","F402","F403"] "__init__.py" = ["F401", "F402", "F403"]
"utils.py" = ["F401"] "utils.py" = ["F401"]
[dependency-groups] [dependency-groups]
dev = [ dev = [
"api","dev","sentencepiece" "api", "dev", "sentencepiece"
] ]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment