Skip to content

Commit d1cf663

Browse files
committed
Merge upstream huggingface/lighteval main into merge_hf_main
Upstream refactor splits src/lighteval/tasks into per-task files under src/lighteval/tasks/tasks/ and src/lighteval/tasks/multilingual/tasks/, drops default_tasks.py / default_prompts.py / multilingual/tasks.py, and removes the suite field from LightevalTaskConfig. Port our edits to the new structure: - tasks/gsm_plus.py: generation_size 16384 - tasks/gsm8k.py: generation_size 2048 - tasks/mgsm.py: hf_revision, suffix exact_match + expr_gold_metric, language-specific stop sequences for all 11 subsets - tasks/piqa.py: switch to lighteval/piqa mirror - tasks/siqa.py: pin hf_revision - tasks/mmlu_pro.py: fix upstream's hardcoded ABCD letters so the prompt uses dynamic letters based on the number of options; add a parallel mmlu_pro_raw task exposing the handmade prompt (no inspect_ai) - tasks/ruler.py: new home for the ruler prompt helper - tasks/advbench.py: move here from community_tasks/ - multilingual/tasks/mathalea.py: move here from community_tasks/ - multilingual/tasks/french.py: keep jzhang86/fr_ifeval fallback and the generative GPQA-fr-diamond variant with prompt_gpqa_fr_instruct Other conflict resolutions: - pyproject.toml: take upstream unpinned transformers, vllm>=0.11.0, new inspect-ai and openai deps - vllm_model.py: keep max_seq_len_to_capture fallback, Mistral eos_token guard, prefix-cache None-skip in logprob loop, and skip_reading_prefix_cache via guarded attribute assignment; adopt upstream's build_vllm_token_prompts helper - llm_as_judge.py: keep max_model_len=65536, adopt upstream's api_key/base_url litellm pass-through - lighteval_task.py: preserve name/data_dir fallback in load_dataset while picking up upstream's data_files support; keep partial args detail in __str__ for deterministic cache hashing - cache_management.py: adopt name-only task_to_configs lookup; keep regex that strips function memory addresses for hash determinism
2 parents 481d9bd + 10b9104 commit d1cf663

410 files changed

Lines changed: 30383 additions & 32080 deletions

File tree

Some content is hidden

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

.github/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ changelog:
55
categories:
66
- title: New Features 🎉
77
labels:
8-
- feature/enhancement
8+
- feature
9+
- title: Enhancement ⚙️
10+
labels:
11+
- enhancement
912
- title: Documentation 📚
1013
labels:
1114
- documentation

.github/workflows/doc-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
build:
12-
uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main
12+
uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@90b4ee2c10b81b5c1a6367c4e6fc9e2fb510a7e3 # main
1313
with:
1414
commit_sha: ${{ github.sha }}
1515
package: lighteval

.github/workflows/doc-pr-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ concurrency:
99

1010
jobs:
1111
build:
12-
uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@main
12+
uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@90b4ee2c10b81b5c1a6367c4e6fc9e2fb510a7e3 # main
1313
with:
1414
commit_sha: ${{ github.event.pull_request.head.sha }}
1515
pr_number: ${{ github.event.number }}

.github/workflows/doc-pr-upload.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ on:
88

99
jobs:
1010
build:
11-
uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@main
11+
uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@9ad2de8582b56c017cb530c1165116d40433f1c6 # main
1212
with:
1313
package_name: lighteval
1414
secrets:
1515
hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }}
16-
comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }}
16+
comment_bot_app_id: ${{ secrets.COMMENT_BOT_APP_ID }}
17+
comment_bot_secret_pem: ${{ secrets.COMMENT_BOT_SECRET_PEM }}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: PR Style Bot
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
style:
12+
uses: huggingface/huggingface_hub/.github/workflows/style-bot-action.yml@e000c1c89c65aee188041723456ac3a479416d4c # main
13+
with:
14+
python_quality_dependencies: "[quality]"
15+
secrets:
16+
bot_token: ${{ secrets.HF_STYLE_BOT_ACTION }}

.github/workflows/quality.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2020
- name: Setup Python environment
21-
uses: actions/setup-python@v2
21+
uses: actions/setup-python@e9aba2c848f5ebd159c070c61ea2c4e2b122355e # v2
2222
with:
2323
python-version: '3.10'
2424
- name: Install dependencies

.github/workflows/slow_tests.yaml

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,57 @@ jobs:
2525
fi
2626
2727
- name: Checkout repository
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2929
with:
3030
lfs: true
3131

3232
- name: Install uv
33-
uses: astral-sh/setup-uv@v5
33+
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
3434
with:
3535
enable-cache: true
3636

3737
- name: Install the project
38-
run: uv sync --extra dev
38+
run: uv sync --extra dev-gpu
3939

40+
- name: Install Python development headers
41+
run: sudo apt-get update && sudo apt-get install -y python3.12-dev
42+
43+
- name: Cache CUDA Toolkit
44+
id: cache-cuda
45+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
46+
with:
47+
path: /usr/local/cuda-12.8
48+
key: cuda-toolkit-12-8-${{ runner.os }}
49+
50+
- name: Install CUDA Toolkit
51+
if: steps.cache-cuda.outputs.cache-hit != 'true'
52+
run: |
53+
# Add NVIDIA package repositories
54+
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
55+
sudo dpkg -i cuda-keyring_1.1-1_all.deb
56+
sudo apt-get update
57+
# Install CUDA toolkit 12.8 to match nvidia-cuda-runtime-cu12==12.8.90
58+
sudo apt-get install -y cuda-toolkit-12-8
59+
60+
- name: Verify CUDA installation
61+
run: |
62+
ls -la /usr/local/cuda-12.8/bin/nvcc || echo "WARNING: nvcc not found at /usr/local/cuda-12.8/bin/nvcc"
63+
if [ -f /usr/local/cuda-12.8/bin/nvcc ]; then
64+
/usr/local/cuda-12.8/bin/nvcc --version
65+
fi
66+
67+
- name: Setup CUDA environment
68+
run: |
69+
export CUDA_HOME=/usr/local/cuda-12.8
70+
export PATH="/usr/local/cuda-12.8/bin:$PATH"
71+
echo "CUDA_HOME=/usr/local/cuda-12.8" >> $GITHUB_ENV
72+
echo "/usr/local/cuda-12.8/bin" >> $GITHUB_PATH
4073
4174
- name: run nvidia-smi
4275
run: nvidia-smi
4376

4477
- name: Run tests
45-
run: uv run pytest --disable-pytest-warnings --runslow tests/slow_tests/
78+
run: |
79+
export CUDA_HOME=/usr/local/cuda-12.8
80+
export PATH="/usr/local/cuda-12.8/bin:$PATH"
81+
uv run pytest --disable-pytest-warnings --runslow -v -s tests/slow_tests/

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
enable-cache: true
4747

4848
- name: Install the project
49-
run: uv sync --extra dev
49+
run: uv sync --extra dev-gpu
5050

5151
- name: Ensure cache directories exist
5252
run: mkdir -p cache/models cache/datasets

.github/workflows/trufflehog.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1515
with:
1616
fetch-depth: 0
1717
- name: Secret Scanning
18-
uses: trufflesecurity/trufflehog@main
18+
uses: trufflesecurity/trufflehog@6bd2d14f7a4bc1e569fa3550efa7ec632a4fa67b # main
1919
with:
2020
extra_args: --only-verified
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: vLLM Main Branch Tests
2+
3+
on:
4+
schedule:
5+
- cron: '0 2 * * 1' # Every Monday at 2 AM UTC
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
test_vllm_main:
13+
name: Test with vLLM main branch
14+
runs-on: 'aws-g4dn-2xlarge-use1-public-80'
15+
continue-on-error: true
16+
17+
steps:
18+
- name: Install Git LFS
19+
run: |
20+
if ! command -v git-lfs &> /dev/null; then
21+
sudo apt-get update && sudo apt-get install -y git-lfs
22+
git lfs install
23+
fi
24+
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
with:
28+
lfs: true
29+
30+
- name: Install uv
31+
uses: astral-sh/setup-uv@v5
32+
with:
33+
enable-cache: true
34+
35+
- name: Install the project
36+
run: uv sync --extra dev-gpu
37+
38+
- name: Install Python development headers
39+
run: sudo apt-get update && sudo apt-get install -y python3.12-dev
40+
41+
- name: Cache CUDA Toolkit
42+
id: cache-cuda
43+
uses: actions/cache@v4
44+
with:
45+
path: /usr/local/cuda-12.8
46+
key: cuda-toolkit-12-8-${{ runner.os }}
47+
48+
- name: Install CUDA Toolkit
49+
if: steps.cache-cuda.outputs.cache-hit != 'true'
50+
run: |
51+
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
52+
sudo dpkg -i cuda-keyring_1.1-1_all.deb
53+
sudo apt-get update
54+
sudo apt-get install -y cuda-toolkit-12-8
55+
56+
- name: Setup CUDA environment
57+
run: |
58+
echo "CUDA_HOME=/usr/local/cuda-12.8" >> $GITHUB_ENV
59+
echo "/usr/local/cuda-12.8/bin" >> $GITHUB_PATH
60+
61+
- name: Verify CUDA
62+
run: |
63+
nvidia-smi
64+
nvcc --version
65+
66+
- name: Install vLLM from main branch
67+
run: |
68+
uv pip uninstall -y vllm || true
69+
uv pip install git+https://github.com/vllm-project/vllm.git@main
70+
71+
- name: Get vLLM version
72+
id: vllm-info
73+
run: |
74+
VERSION=$(uv run python -c "import vllm; print(vllm.__version__)")
75+
echo "version=$VERSION" >> $GITHUB_OUTPUT
76+
echo "Testing vLLM version: $VERSION"
77+
78+
- name: Run tests
79+
run: uv run pytest --disable-pytest-warnings --runslow -v -s tests/slow_tests/test_vllm_model.py

0 commit comments

Comments
 (0)