Skip to content

Commit 05ce7e8

Browse files
authored
Group dependencies and remove requirements.txt (stanford-crfm#1681)
1 parent 663e092 commit 05ce7e8

File tree

4 files changed

+56
-125
lines changed

4 files changed

+56
-125
lines changed

.github/workflows/test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: actions/cache@v2
2121
with:
2222
path: ~/.cache/pip
23-
key: pip-${{ hashFiles('requirements.txt') }}-${{ matrix.python-version }}
23+
key: pip-${{ hashFiles('requirements-freeze.txt') }}-${{ matrix.python-version }}
2424
restore-keys: |
2525
pip-
2626
- run: pip install -e .
@@ -43,7 +43,7 @@ jobs:
4343
- uses: actions/cache@v2
4444
with:
4545
path: ~/.cache/pip
46-
key: pip-${{ hashFiles('requirements.txt') }}
46+
key: pip-${{ hashFiles('requirements-freeze.txt') }}
4747
restore-keys: |
4848
pip-
4949
# Installs dependencies and performs static code checks

MANIFEST.in

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
recursive-include src/helm/proxy/clients/ *.sp
22
recursive-include src/helm/benchmark/ *.json
33
recursive-include src/helm/benchmark/static/ *.css *.html *.js *.png *.yaml
4-
include requirements.txt

requirements.txt

-79
This file was deleted.

setup.cfg

+54-43
Original file line numberDiff line numberDiff line change
@@ -23,68 +23,79 @@ include_package_data = True
2323

2424
install_requires=
2525
# Common
26-
zstandard~=0.18.0
27-
tqdm~=4.64.1
28-
pyhocon~=0.3.59
26+
cattrs~=22.2.0
2927
dacite~=1.6.0
30-
simple-slurm~=0.2.6
31-
32-
# Proxy
33-
aleph-alpha-client~=2.14.0
34-
anthropic~=0.2.5
35-
bottle~=0.12.23
36-
gunicorn~=20.1.0
28+
importlib-resources~=5.10.0
3729
Mako~=1.2.3
30+
numpy~=1.23.3
31+
pyhocon~=0.3.59
32+
retrying~=1.3.4
33+
simple-slurm~=0.2.6 # For slurm_jobs
34+
spacy~=3.5.3
35+
tqdm~=4.64.1
36+
zstandard~=0.18.0
3837
# sqlitedict==2.0.0 is slow! https://github.com/RaRe-Technologies/sqlitedict/issues/152
39-
# Keep the version at 1.7.0.
38+
# Keep sqlitedict version at 1.7.0.
4039
sqlitedict~=1.7.0
41-
pymongo~=4.2.0
42-
retrying~=1.3.4
43-
websocket-client~=1.3.2 # For Anthropic (Legacy stanford-online-all-v4-s3)
44-
openai~=0.27.8
45-
tiktoken~=0.3.3
46-
transformers~=4.28.1
47-
tokenizers~=0.13.3
48-
icetk~=0.0.4
40+
# TODO: Remove these from common
4941
protobuf~=3.20.2 # Can't use 4.21.0 due to backward incompatibility
50-
google-api-python-client~=2.64.0
51-
revChatGPT~=0.1.1
42+
pymongo~=4.2.0
5243

53-
# Scenarios
54-
datasets~=2.5.2 # For math scenarios
44+
# Basic Scenarios
45+
datasets~=2.5.2
5546
pyarrow~=11.0.0 # Pinned transitive dependency for datasets; workaround for #1026
56-
gdown~=4.4.0
5747
jsonlines~=3.1.0 # Not really needed
58-
sympy~=1.11.1 # For math scenarios
59-
sentencepiece~=0.1.97
60-
numba~=0.56.4
61-
cattrs~=22.2.0
62-
xlrd~=2.0.1 # Used by pandas.read_excel in ice_scenario
6348

64-
# Metrics
65-
importlib-resources~=5.10.0
49+
# Basic metrics
6650
nltk~=3.7
51+
pyext~=0.7
52+
rouge-score~=0.1.2
6753
scipy~=1.9.1
6854
uncertainty-calibration~=0.1.3
69-
rouge-score~=0.1.2
70-
pyext~=0.7
71-
pytrec_eval==0.5
72-
sacrebleu~=2.2.1
73-
scaleapi~=2.13.0
7455
# Work around https://github.com/p-lambda/verified_calibration/issues/11
7556
# TODO: Remove after this issue is resolved
7657
scikit-learn~=1.1.2
77-
spacy~=3.5.3
78-
summ-eval~=0.892
58+
59+
# Server Extras
60+
bottle~=0.12.23
61+
gunicorn~=20.1.0
62+
63+
# Scenario Extras
64+
gdown~=4.4.0 # For opinions_qa_scenario
65+
sympy~=1.11.1 # For numeracy_scenario
66+
xlrd~=2.0.1 # For ice_scenario: used by pandas.read_excel
67+
68+
# Model Extras
69+
aleph-alpha-client~=2.14.0
70+
anthropic~=0.2.5
71+
icetk~=0.0.4 # for ice_tokenizer_client
72+
openai~=0.27.8
73+
revChatGPT~=0.1.1
74+
sentencepiece~=0.1.97 # For palmyra_client and yalm_tokenizer
75+
tiktoken~=0.3.3 # for openai_client
76+
tokenizers~=0.13.3 # for aleph_alpha_client
77+
websocket-client~=1.3.2 # For Anthropic (Legacy stanford-online-all-v4-s3)
78+
79+
# Models and Metrics Extras
80+
transformers~=4.28.1 # For anthropic_client, huggingface_client, huggingface_tokenizer, test_openai_token_cost_estimator, model_summac (via summarization_metrics)
81+
# TODO: Upgrade torch
82+
torch~=1.12.1 # For huggingface_client, yalm_tokenizer, model_summac (via summarization_metrics)
83+
torchvision~=0.13.1 # For huggingface_client, yalm_tokenizer, model_summac (via summarization_metrics)
84+
85+
# Metrics Extras
86+
google-api-python-client~=2.64.0 # For perspective_api_client via toxicity_metrics
87+
numba~=0.56.4 # For copyright_metrics
88+
pytrec_eval==0.5 # For ranking_metrics
89+
sacrebleu~=2.2.1 # For disinformation_metrics, machine_translation_metrics
90+
summ-eval~=0.892 # For summarization_metrics
91+
92+
# Human Evaluation Extras
93+
scaleapi~=2.13.0
7994
surge-api~=1.1.0
80-
# End users should install a CUDA version of PyTorch manually if needed
81-
torch~=1.12.1 # Summarization metrics
82-
torchvision~=0.13.1
8395

84-
# plotting
96+
# Plots Extras
8597
colorcet~=3.0.1
8698
matplotlib~=3.6.0
87-
numpy~=1.23.3
8899
seaborn~=0.11.0
89100

90101
[options.entry_points]

0 commit comments

Comments
 (0)