Skip to content

Commit 068f6ff

Browse files
committed
Merge branch 'main' into support-ov-models-via-genai
2 parents cd4cb06 + e4a7b69 commit 068f6ff

File tree

6,612 files changed

+119477
-3564
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,612 files changed

+119477
-3564
lines changed

.github/workflows/new_tasks.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,16 @@ jobs:
1616
name: Scan for changed tasks
1717
steps:
1818
- name: checkout
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
with:
2121
fetch-depth: 2 # OR "2" -> To retrieve the preceding commit.
2222

2323
# Uses the tj-actions/changed-files action to check for changes.
24-
# Outputs provided here: https://github.com/tj-actions/changed-files#outputs
2524
# The `files_yaml` input optionally takes a yaml string to specify filters,
2625
# and prepends the filter name to the standard output names.
2726
- name: Check task folders
2827
id: changed-tasks
29-
uses: tj-actions/changed-files@v44.5.2
28+
uses: tj-actions/changed-files@v46.0.5
3029
with:
3130
# tasks checks the tasks folder and api checks the api folder for changes
3231
files_yaml: |
@@ -47,7 +46,7 @@ jobs:
4746
4847
- name: Set up Python 3.9
4948
if: steps.changed-tasks.outputs.tasks_any_modified == 'true' || steps.changed-tasks.outputs.api_any_modified == 'true'
50-
uses: actions/setup-python@v4
49+
uses: actions/setup-python@v5
5150
with:
5251
python-version: 3.9
5352
cache: 'pip'

.github/workflows/publish.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,29 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515
- name: Set up Python
16-
uses: actions/setup-python@v4
16+
uses: actions/setup-python@v5
1717
with:
1818
python-version: "3.x"
1919

20+
- name: Check version consistency
21+
run: |
22+
# Extract version from pyproject.toml
23+
PYPROJECT_VERSION=$(grep 'version = ' pyproject.toml | head -1 | cut -d'"' -f2)
24+
25+
# Extract version from __init__.py
26+
INIT_VERSION=$(grep '__version__ = ' lm_eval/__init__.py | head -1 | cut -d'"' -f2)
27+
28+
echo "Version in pyproject.toml: $PYPROJECT_VERSION"
29+
echo "Version in __init__.py: $INIT_VERSION"
30+
31+
# Check if versions match
32+
if [ "$PYPROJECT_VERSION" != "$INIT_VERSION" ]; then
33+
echo "Error: Version mismatch between pyproject.toml ($PYPROJECT_VERSION) and __init__.py ($INIT_VERSION)"
34+
exit 1
35+
fi
36+
37+
echo "Version check passed: $PYPROJECT_VERSION"
38+
2039
- name: Install pypa/build
2140
run: >-
2241
python3 -m
@@ -26,7 +45,7 @@ jobs:
2645
- name: Build a binary wheel and a source tarball
2746
run: python3 -m build
2847
- name: Store the distribution packages
29-
uses: actions/upload-artifact@v3
48+
uses: actions/upload-artifact@v4
3049
with:
3150
name: python-package-distributions
3251
path: dist/
@@ -46,7 +65,7 @@ jobs:
4665

4766
steps:
4867
- name: Download all the dists
49-
uses: actions/download-artifact@v3
68+
uses: actions/download-artifact@v4
5069
with:
5170
name: python-package-distributions
5271
path: dist/
@@ -68,7 +87,7 @@ jobs:
6887

6988
steps:
7089
- name: Download all the dists
71-
uses: actions/download-artifact@v3
90+
uses: actions/download-artifact@v4
7291
with:
7392
name: python-package-distributions
7493
path: dist/

.github/workflows/unit_tests.yml

Lines changed: 80 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -20,76 +20,95 @@ jobs:
2020
timeout-minutes: 5
2121

2222
steps:
23-
- name: Checkout Code
24-
uses: actions/checkout@v4
25-
- name: Set up Python 3.8
26-
uses: actions/setup-python@v5
27-
with:
28-
python-version: 3.8
29-
cache: pip
30-
cache-dependency-path: pyproject.toml
31-
- name: Pre-Commit
32-
env:
33-
SKIP: "no-commit-to-branch,mypy"
34-
35-
uses: pre-commit/action@v3.0.1
36-
# # mypy turned off for now
37-
# - name: Lint with mypy
38-
# run: mypy . --ignore-missing-imports --check-untyped-defs --explicit-package-bases --warn-unreachable
39-
# Job 2
23+
- name: Checkout Code
24+
uses: actions/checkout@v4
25+
- name: Set up Python 3.9
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: 3.9
29+
cache: pip
30+
cache-dependency-path: pyproject.toml
31+
- name: Pre-Commit
32+
env:
33+
SKIP: "no-commit-to-branch,mypy"
34+
uses: pre-commit/action@v3.0.1
35+
# Job 2
4036
testcpu:
4137
name: CPU Tests
4238
runs-on: ubuntu-latest
4339
strategy:
40+
fail-fast: true
4441
matrix:
45-
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
42+
python-version: ["3.9", "3.10", "3.11"]
4643
timeout-minutes: 30
4744
steps:
48-
- name: Checkout Code
49-
uses: actions/checkout@v4
50-
- name: Set up Python ${{ matrix.python-version }}
51-
uses: actions/setup-python@v5
52-
with:
53-
python-version: ${{ matrix.python-version }}
54-
cache: pip
55-
cache-dependency-path: pyproject.toml
56-
- name: Install dependencies
57-
run: |
58-
python -m pip install --upgrade pip
59-
pip install -e '.[dev,sentencepiece,api]' --extra-index-url https://download.pytorch.org/whl/cpu
60-
# Install optional git dependencies
61-
# pip install bleurt@https://github.com/google-research/bleurt/archive/b610120347ef22b494b6d69b4316e303f5932516.zip#egg=bleurt
62-
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
63-
- name: Test with pytest
64-
run: python -m pytest --showlocals -s -vv -n=auto --ignore=tests/models/test_neuralmagic.py --ignore=tests/models/test_openvino.py
65-
- name: Archive artifacts
66-
uses: actions/upload-artifact@v3
67-
with:
68-
name: output_results
69-
path: |
70-
test_logs/*
45+
- name: Checkout Code
46+
uses: actions/checkout@v4
47+
- name: Set up Python ${{ matrix.python-version }}
48+
uses: actions/setup-python@v5
49+
with:
50+
python-version: ${{ matrix.python-version }}
51+
cache: pip
52+
cache-dependency-path: pyproject.toml
53+
54+
# Cache HuggingFace cache directory for CPU tests
55+
- name: Cache HuggingFace cache (CPU tests)
56+
uses: actions/cache@v3
57+
id: cache-hf-cpu
58+
with:
59+
path: ~/.cache/huggingface
60+
key: ${{ runner.os }}-hf-cache-cpu
61+
restore-keys: |
62+
${{ runner.os }}-hf-cache-cpu
63+
64+
- name: Install dependencies
65+
run: |
66+
python -m pip install --upgrade pip
67+
pip install -e '.[dev]' --extra-index-url https://download.pytorch.org/whl/cpu
68+
pip install hf_xet
69+
70+
- name: Test with pytest
71+
run: python -m pytest --showlocals -s -vv -n=auto --ignore=tests/models/test_neuralmagic.py --ignore=tests/models/test_openvino.py --ignore=tests/models/test_hf_steered.py
72+
continue-on-error: true # Continue workflow even if tests fail
73+
74+
# Save test artifacts
75+
- name: Archive test artifacts
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: output_testcpu${{ matrix.python-version }}
79+
path: |
80+
test_logs/*
81+
7182
testmodels:
7283
name: External LM Tests
7384
runs-on: ubuntu-latest
7485
timeout-minutes: 30
7586
steps:
76-
- name: Checkout Code
77-
uses: actions/checkout@v4
78-
- name: Set up Python 3.8
79-
uses: actions/setup-python@v5
80-
with:
81-
python-version: 3.8
82-
cache: pip
83-
cache-dependency-path: pyproject.toml
84-
- name: Install dependencies
85-
run: |
86-
python -m pip install --upgrade pip
87-
pip install -e '.[dev,optimum,deepsparse,sparseml,api]' --extra-index-url https://download.pytorch.org/whl/cpu
88-
- name: Test with pytest
89-
run: python -m pytest tests/models --showlocals -s -vv
90-
- name: Archive artifacts
91-
uses: actions/upload-artifact@v3
92-
with:
93-
name: output_results
94-
path: |
95-
test_logs/*
87+
- name: Checkout Code
88+
uses: actions/checkout@v4
89+
- name: Set up Python 3.9
90+
uses: actions/setup-python@v5
91+
with:
92+
python-version: 3.9
93+
cache: pip
94+
cache-dependency-path: pyproject.toml
95+
96+
# Cache HuggingFace cache directory for External LM tests
97+
- name: Cache HuggingFace cache (External LM tests)
98+
uses: actions/cache@v3
99+
id: cache-hf-lm
100+
with:
101+
path: ~/.cache/huggingface
102+
key: ${{ runner.os }}-hf-cache-external-lm
103+
restore-keys: |
104+
${{ runner.os }}-hf-cache-external-lm
105+
106+
- name: Install dependencies
107+
run: |
108+
python -m pip install --upgrade pip
109+
pip install -e '.[dev,optimum,deepsparse,sparseml,api]' --extra-index-url https://download.pytorch.org/whl/cpu
110+
pip install -U transformers peft accelerate
111+
112+
- name: Test with pytest
113+
run: python -m pytest tests/models --showlocals -s -vv
114+
continue-on-error: true # Continue workflow even if tests fail

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ build
88
dist
99
*.egg-info
1010
venv
11+
.venv/
1112
.vscode/
1213
temp
1314
__pycache__

.pre-commit-config.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
exclude: ^tests/testdata/
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.5.0
5+
rev: v5.0.0
66
hooks:
77
- id: check-added-large-files
88
- id: check-ast
@@ -29,7 +29,7 @@ repos:
2929
- id: mixed-line-ending
3030
args: [--fix=lf]
3131
- repo: https://github.com/astral-sh/ruff-pre-commit
32-
rev: v0.4.8
32+
rev: v0.11.0
3333
hooks:
3434
# Run the linter.
3535
- id: ruff
@@ -38,14 +38,20 @@ repos:
3838
# Run the formatter.
3939
- id: ruff-format
4040
- repo: https://github.com/codespell-project/codespell
41-
rev: v2.3.0
41+
rev: v2.4.1
4242
hooks:
4343
- id: codespell
4444
exclude: >
4545
(?x)^(
4646
.*\.json|ignore.txt|lm_eval/tasks/.*|.*yaml|.*\.ipynb
4747
)$
4848
args: [--check-filenames, --check-hidden, --ignore-words=ignore.txt]
49+
- repo: https://github.com/jackdewinter/pymarkdown
50+
rev: v0.9.29
51+
hooks:
52+
- id: pymarkdown
53+
exclude: ^lm_eval/tasks/
54+
args: [fix, -r]
4955
# - repo: https://github.com/pre-commit/mirrors-mypy
5056
# rev: v1.5.1
5157
# hooks:

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @haileyschoelkopf @lintangsutawika @baberabb
1+
* @baberabb @stellaathena

0 commit comments

Comments
 (0)