1
1
[build-system ]
2
- requires = [" hatchling" ]
3
2
build-backend = " hatchling.build"
3
+ requires = [" hatchling" ]
4
4
5
5
[project ]
6
- name = " openllm"
7
- dynamic = [" version" ]
8
- description = ' OpenLLM: REST/gRPC API server for running any open Large-Language Model - StableLM, Llama, Alpaca, Dolly, Flan-T5, Custom'
9
- readme = " README.md"
10
- requires-python = " >=3.8"
11
- license = " Apache-2.0"
12
- keywords = [
13
- " MLOps" ,
14
- " AI" ,
15
- " BentoML" ,
16
- " Model Serving" ,
17
- " Model Deployment" ,
18
- " LLMOps" ,
19
- " Large Language Model" ,
20
- " Generative AI" ,
21
- " Stable Diffusion" ,
22
- " StableLM" ,
23
- " Alpaca" ,
24
- " PyTorch" ,
25
- " Transformers" ,
26
- ]
27
6
authors = [
28
7
{
name =
" Aaron Pham" ,
email =
" [email protected] " },
29
8
{
name =
" BentoML Team" ,
email =
" [email protected] " },
@@ -57,7 +36,7 @@ dependencies = [
57
36
" grpcio-reflection" ,
58
37
" httpx[http2]" ,
59
38
# transformers[torch] includes torch and transformers
60
- " transformers[torch,accelerate,tokenizers,onnxruntime,onnx]>=4.29.0" ,
39
+ " transformers[torch,accelerate,tokenizers,onnxruntime,onnx,optimum ]>=4.29.0" ,
61
40
# Super fast JSON serialization
62
41
" orjson" ,
63
42
" inflection" ,
@@ -66,18 +45,33 @@ dependencies = [
66
45
# black for generating service file.
67
46
" black[jupyter]==23.3.0" ,
68
47
]
48
+ description = ' OpenLLM: REST/gRPC API server for running any open Large-Language Model - StableLM, Llama, Alpaca, Dolly, Flan-T5, Custom'
49
+ dynamic = [" version" ]
50
+ keywords = [
51
+ " MLOps" ,
52
+ " AI" ,
53
+ " BentoML" ,
54
+ " Model Serving" ,
55
+ " Model Deployment" ,
56
+ " LLMOps" ,
57
+ " Large Language Model" ,
58
+ " Generative AI" ,
59
+ " Stable Diffusion" ,
60
+ " StableLM" ,
61
+ " Alpaca" ,
62
+ " PyTorch" ,
63
+ " Transformers" ,
64
+ ]
65
+ license = " Apache-2.0"
66
+ name = " openllm"
67
+ readme = " README.md"
68
+ requires-python = " >=3.8"
69
69
70
70
[project .optional-dependencies ]
71
- all = [
72
- ' openllm[fine-tune]' ,
73
- ' openllm[chatglm]' ,
74
- ' openllm[falcon]' ,
75
- ' openllm[flan-t5]' ,
76
- ' openllm[starcoder]' ,
77
- ]
78
- fine-tune = [" peft" , " bitsandbytes" , " datasets" ]
71
+ all = [' openllm[fine-tune]' , ' openllm[chatglm]' , ' openllm[falcon]' , ' openllm[flan-t5]' , ' openllm[starcoder]' ]
79
72
chatglm = [' cpm_kernels' , ' sentencepiece' ]
80
73
falcon = [' einops' ]
74
+ fine-tune = [" peft" , " bitsandbytes" , " datasets" ]
81
75
flan-t5 = [' flax' , ' jax' , ' jaxlib' , ' tensorflow' ]
82
76
starcoder = [' bitsandbytes' ]
83
77
@@ -108,38 +102,31 @@ dependencies = [
108
102
" pre-commit" ,
109
103
]
110
104
[tool .hatch .envs .default .scripts ]
105
+ cov = [" test-cov" , " cov-report" ]
106
+ cov-report = [" - coverage combine" , " coverage report" ]
111
107
setup = " pre-commit install"
112
108
test = " pytest {args:tests}"
113
109
test-cov = " coverage run -m pytest {args:tests}"
114
- cov-report = [" - coverage combine" , " coverage report" ]
115
- cov = [" test-cov" , " cov-report" ]
116
110
117
111
[[tool .hatch .envs .all .matrix ]]
118
112
python = [" 3.8" , " 3.9" , " 3.10" , " 3.11" ]
119
113
120
114
[tool .hatch .envs .dev ]
121
- detached = true
122
115
dependencies = [" ruff>=0.0.243" , " pyright" , " hatch" ]
116
+ detached = true
123
117
124
118
[tool .hatch .envs .dev .scripts ]
125
- typing = " pyright {args:src/openllm tests}"
126
- style = [" ruff {args:.}" , " black --check --diff {args:.}" ]
127
- fmt = [
128
- " black {args:.}" ,
129
- " black --pyi {args:typings/}" ,
130
- " ruff --fix {args:.}" ,
131
- " style" ,
132
- ]
133
119
all = [" fmt" , " typing" ]
120
+ fmt = [" black {args:.}" , " black --pyi {args:typings/}" , " ruff --fix {args:.}" , " style" ]
121
+ style = [" ruff {args:.}" , " black --check --diff {args:.}" ]
122
+ typing = " pyright {args:src/openllm tests}"
134
123
135
124
[tool .pytest .ini_options ]
136
125
addopts = [" -rfEX" , " -pno:warnings" ]
137
126
python_files = [" test_*.py" , " *_test.py" ]
138
127
testpaths = [" tests" ]
139
128
140
129
[tool .black ]
141
- target-version = [" py311" ]
142
- line-length = 120
143
130
exclude = '''
144
131
(
145
132
/(
@@ -158,10 +145,10 @@ exclude = '''
158
145
| src/openllm/__about__.py
159
146
)
160
147
'''
148
+ line-length = 120
149
+ target-version = [" py311" ]
161
150
162
151
[tool .ruff ]
163
- target-version = " py311"
164
- line-length = 120
165
152
ignore = [
166
153
# Allow non-abstract empty methods in abstract base classes
167
154
" B027" ,
@@ -178,6 +165,8 @@ ignore = [
178
165
" PLR0913" ,
179
166
" PLR0915" ,
180
167
]
168
+ line-length = 120
169
+ target-version = " py311"
181
170
unfixable = [
182
171
" F401" , # Don't touch unused imports, just warn about it.
183
172
]
@@ -186,8 +175,8 @@ unfixable = [
186
175
convention = " google"
187
176
188
177
[tool .ruff .isort ]
189
- lines-after-imports = 2
190
178
known-first-party = [" openllm" , " bentoml" , ' transformers' ]
179
+ lines-after-imports = 2
191
180
192
181
[tool .ruff .flake8-quotes ]
193
182
inline-quotes = " single"
@@ -197,31 +186,31 @@ ban-relative-imports = "all"
197
186
198
187
[tool .ruff .per-file-ignores ]
199
188
# Tests can use magic values, assertions, and relative imports
200
- "tests/**/*" = [" PLR2004" , " S101" , " TID252" ]
201
189
"__init__.py" = [" E402" , " F401" , " F403" , " F811" ]
190
+ "tests/**/*" = [" PLR2004" , " S101" , " TID252" ]
202
191
203
192
[tool .pyright ]
204
- pythonVersion = " 3.11"
205
- include = [" src/" , " tests/" ]
206
193
analysis.useLibraryCodeForTypes = true
207
- typeCheckingMode = " strict"
208
- strictListInference = true
209
- strictDictionaryInference = true
210
- strictSetInference = true
211
- strictParameterNoneValue = true
212
194
enableTypeIgnoreComments = true
195
+ include = [" src/" , " tests/" ]
196
+ pythonVersion = " 3.11"
213
197
reportMissingImports = " none"
214
- reportMissingTypeStubs = " warning"
215
198
reportMissingModuleSource = " warning"
216
- reportUnknownVariableType = " warning"
199
+ reportMissingTypeStubs = " warning"
217
200
reportUnknownMemberType = " warning"
201
+ reportUnknownVariableType = " warning"
202
+ strictDictionaryInference = true
203
+ strictListInference = true
204
+ strictParameterNoneValue = true
205
+ strictSetInference = true
206
+ typeCheckingMode = " strict"
218
207
219
208
220
209
[tool .coverage .run ]
221
- source_pkgs = [" openllm" , " tests" ]
222
210
branch = true
223
- parallel = true
224
211
omit = [" src/openllm/__about__.py" ]
212
+ parallel = true
213
+ source_pkgs = [" openllm" , " tests" ]
225
214
226
215
[tool .coverage .paths ]
227
216
openllm = [" src/openllm" , " */openllm/src/openllm" ]
0 commit comments