-
Notifications
You must be signed in to change notification settings - Fork 13
/
pyproject.toml
205 lines (186 loc) · 5.55 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
[build-system]
requires = [
"setuptools>=48",
"setuptools_scm[toml]>=6.3.1",
# protobuf-generation tools
"grpcio-tools==1.62.1",
"mypy-protobuf==3.5.0",
"types-protobuf>=3.20.4"
]
build-backend = "setuptools.build_meta"
[project]
name = "vllm-tgis-adapter"
description = "vLLM adapter for a TGIS-compatible grpc server"
readme = "README.md"
license = {text = "Apache 2"}
authors = [{name = "Daniele Trifirò", email = "[email protected]"}]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Development Status :: 4 - Beta"
]
requires-python = ">=3.9"
dynamic = ["version"]
dependencies = [
"vllm>=0.6.4",
"prometheus_client==0.21.0",
"grpcio==1.67.0",
"grpcio-health-checking==1.62.2",
"grpcio-reflection==1.62.2",
"accelerate==0.34.2",
"hf-transfer==0.1.8",
"cachetools~=5.5",
# additional dependencies for OpenTelemetry tracing
"opentelemetry-sdk>=1.26.0,<1.28.0",
"opentelemetry-api>=1.26.0,<1.28.0",
"opentelemetry-exporter-otlp>=1.26.0,<1.28.0",
"opentelemetry-semantic-conventions-ai>=0.4.1,<0.5.0"
]
[project.urls]
Issues = "https://github.com/opendatahub-io/vllm-tgis-adapter/issues"
Source = "https://github.com/opendatahub-io/vllm-tgis-adapter"
[project.scripts]
grpc_healthcheck = "vllm_tgis_adapter.healthcheck:cli"
model-util = "vllm_tgis_adapter.tgis_utils.scripts:cli"
text-generation-server = "vllm_tgis_adapter.tgis_utils.scripts:cli"
convert_pt_to_prompt = "vllm_tgis_adapter.tgis_utils.convert_pt_to_prompt:cli"
[project.optional-dependencies]
tests = [
"pytest==8.3.3",
"pytest-cov==6.0.0",
"pytest-mock==3.14.0",
"pytest-asyncio==0.24.0",
"requests==2.32.3"
]
dev = [
"vllm_tgis_adapter[tests]",
"ruff==0.8.3",
"mypy==1.12.1",
"types-protobuf==5.28.0.20240924",
"types-requests==2.32.0.20240914"
]
flash_attn = [
# it's easier to install flash-attn from wheel rather than like this as extra
# "https://github.com/Dao-AILab/flash-attention/releases/download/v2.5.6/flash_attn-2.5.6+cu118torch2.0cxx11abiFALSE-cp311-cp311-linux_x86_64.whl",
"flash-attn==2.6.3",
"packaging", # FIXME: temporary, until https://github.com/Dao-AILab/flash-attention/pull/937 is released
"ninja"
]
[tool.setuptools_scm]
version_file = "src/vllm_tgis_adapter/_version.py"
[tool.setuptools.packages.find]
where = ["src"]
namespaces = false
[tool.setuptools.package-data]
vllm_tgis_adapter = [
"**/*.proto"
]
[tool.pytest.ini_options]
addopts = "-ra -k \"not hf_data\""
markers = [
"hf_data: marks tests that download data from HF hub (deselect with '-m \"not hf_data\"')"
]
[tool.coverage.run]
branch = true
source = ["vllm_tgis_adapter", "tests"]
[tool.coverage.paths]
source = ["src", "*/site-packages"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
"if typing.TYPE_CHECKING:",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"raise AssertionError",
"@overload"
]
[tool.mypy]
# Error output
show_column_numbers = true
show_error_codes = true
show_error_context = true
show_traceback = true
pretty = true
check_untyped_defs = false
# Warnings
warn_no_return = true
warn_redundant_casts = true
warn_unreachable = true
files = ["src", "tests"]
[[tool.mypy.overrides]]
ignore_missing_imports = true
module = [
"grpc"
]
[tool.codespell]
ignore-words-list = " "
[tool.ruff]
output-format = "full"
show-fixes = true
[tool.ruff.lint]
ignore = [
"S101", # assert
"PLR2004", # magic-value-comparison
"PLW2901", # redefined-loop-name
"ISC001", # single-line-implicit-string-concatenation
"SIM105", # suppressible-exception
"SIM108", # if-else-block-instead-of-if-exp
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D107", # Missing docstring in init
"EM102", # Exception must not use a string literal, assign to variable first
"D203", # one blank line before class
"D213", # multi-line-summary-second-line
"PTH123", # open() should be replaced by Path.open
"ANN204", # missing issing return type annotation for special method `__init__`
"EM101", # Exception must not use a string literal, assign to variable first
"ANN101", # missing type annotation for `self` (deprecated, will be removed)
"TRY003", # Avoid specifying long messages outside the exception class
"TD", # todo messages
"FIX", # todo messages
"ERA001", # commented out code
# formatting
"COM812",
"RET504" # Unnecessary assignment to `args` before `return` statement
]
select = ["ALL"]
[tool.ruff.lint.per-file-ignores]
"**/__init__.py" = ["F401"]
"*src/vllm_tgis_adapter/grpc/grpc_server.py" = [
"N802", # name should be lowercase
"ERA001" # Found commented-out code
]
"src/vllm_tgis_adapter/healthcheck.py" = ["T201"]
"src/vllm_tgis_adapter/_version.py" = ["ALL"]
"tests/**" = ["S", "ARG001", "ARG002", "ANN", "PT019", "FBT001", "FBT002"]
"tests/utils.py" = ["T201"]
"setup.py" = [
"T201", # print() use
"S603", # subprocess call: check for execution of untrusted input
"D", # docs
"ANN", # annotations
"TRY003" # long messages outside exception class
]
"examples/*" = [
"T201",
"D",
"ANN",
"TRY003",
'INP001',
"PTH109",
"EM101",
"BLE001",
"PLR0913"
]
[tool.ruff.lint.flake8-type-checking]
strict = true
[tool.ruff.lint.isort]
known-first-party = ["vllm_tgis_adapter"]