Skip to content

Commit 7bf4087

Browse files
lewtunNathan Habibclefourrier
authored
Tidy up dependency groups (#81)
--------- Co-authored-by: Nathan Habib <[email protected]> Co-authored-by: Clémentine Fourrier <[email protected]>
1 parent 927e63e commit 7bf4087

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

.github/workflows/quality.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ jobs:
2424
- name: Install dependencies
2525
run: |
2626
python -m pip install --upgrade pip
27-
python setup.py egg_info
28-
sed '/^$/q' src/lighteval.egg-info/requires.txt > src/lighteval.egg-info/requires_lite.txt
29-
python -m pip install ruff -c src/lighteval.egg-info/requires_lite.txt
30-
rm -rf src/lighteval.egg-info
27+
python -m pip install ".[quality]"
3128
- name: Code quality
3229
run: |
3330
make quality

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
cache: 'pip'
2727
- name: Install lighteval in editable mode
2828
run: |
29-
pip install -e .[accelerate]
29+
pip install -e .[dev]
3030
- name: Get cached files
3131
uses: actions/cache@v2
3232
id: get-cache

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ and pasting your access token.
6262
Lastly, if you intend to push to the code base, you'll need to install the precommit hook for styling tests:
6363

6464
```bash
65-
pip install pre-commit
65+
pip install .[dev]
6666
pre-commit install
6767
```
6868

pyproject.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ dependencies = [
5454
"torch>=2.0",
5555
"GitPython==3.1.31", # for logging
5656
"datasets>=2.14.0",
57-
# Test
58-
"pytest==7.4.0",
5957
# Prettiness
6058
"termcolor==2.3.0",
6159
"pytablewriter",
@@ -64,16 +62,13 @@ dependencies = [
6462
"aenum==3.1.15",
6563
# Base metrics
6664
"nltk==3.8.1",
67-
"numpy",
6865
"scikit-learn",
6966
"spacy==3.7.2",
7067
"sacrebleu",
7168
"rouge_score==0.1.2",
7269
"sentencepiece>=0.1.99",
7370
"protobuf==3.20.*", # pinned for sentencepiece compat
7471
"pycountry",
75-
# Code style
76-
"ruff==v0.2.2",
7772
]
7873

7974
[project.optional-dependencies]
@@ -87,6 +82,9 @@ nanotron = [
8782
"nanotron",
8883
"tensorboardX"
8984
]
85+
quality = ["ruff==v0.2.2","pre-commit"]
86+
tests = ["pytest==7.4.0"]
87+
dev = ["lighteval[accelerate,quality,tests]"]
9088

9189

9290
[project.urls]

0 commit comments

Comments
 (0)