forked from bentoml/BentoML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
367 lines (344 loc) · 9.88 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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
[build-system]
requires = ["setuptools>=63", "setuptools_scm[toml]>=6.2", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "bentoml"
description = "BentoML: The Unified Model Serving Framework"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.7"
keywords = ["MLOps", "AI", "BentoML", "Model Serving", "Model Deployment"]
license = { text = "Apache-2.0" }
authors = [{ name = "BentoML Team", email = "[email protected]" }]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries",
]
dependencies = [
"Jinja2>=3.0.1",
"PyYAML>=5.0",
"aiohttp",
"attrs>=21.1.0",
"cattrs>=22.1.0",
"circus",
"click>=7.0",
"cloudpickle",
"deepmerge",
"fs",
"numpy",
"opentelemetry-api>=1.9.0",
"opentelemetry-instrumentation==0.33b0",
"opentelemetry-instrumentation-aiohttp-client==0.33b0",
"opentelemetry-instrumentation-asgi==0.33b0",
"opentelemetry-sdk>=1.9.0",
"opentelemetry-semantic-conventions==0.33b0",
"opentelemetry-util-http==0.33b0",
"packaging>=20.0",
"pathspec",
"pip-tools>=6.6.2",
"prometheus-client>=0.10.0",
"psutil",
"pynvml<12",
"python-dateutil",
"python-dotenv>=0.20.0",
"python-multipart",
"requests",
"rich>=11.2.0",
"schema",
"simple-di>=0.1.4",
"starlette",
"uvicorn",
"watchfiles>=0.15.0",
"backports.cached-property;python_version<'3.8'",
"backports.shutil_copytree;python_version<'3.8'",
"importlib-metadata;python_version<'3.8'",
]
dynamic = ["version"]
[project.urls]
"Documentation" = "https://docs.bentoml.org/en/latest/"
"Bug Reports" = "https://github.com/bentoml/BentoML/issues"
"BentoML Community Slack" = "https://bit.ly/2N5IpbB"
"BentoML Official Blog" = "https://modelserving.com"
"BentoML Twitter" = "https://twitter.com/bentomlai"
[project.scripts]
bentoml = "bentoml_cli.cli:cli"
[tool.setuptools.package-data]
bentoml = ["bentoml/*"]
bentoml_cli = ["bentoml_cli/*"]
[tool.setuptools.exclude-package-data]
"*" = [
".git*",
".bazel*",
"BUILD.bazel",
"WORKSPACE",
"*.md",
"Makefile",
"*.py[cod]",
"typings",
]
bentoml = ["grpc/buf.yaml", "_internal/frameworks/FRAMEWORK_TEMPLATE_PY"]
bentoml_cli = ["worker/README.md"]
[tool.setuptools.packages.find]
where = ["src"]
include = [
# include bentoml packages
"bentoml",
"bentoml.grpc*",
"bentoml.testing*",
"bentoml._internal*",
# include bentoml_cli packages
"bentoml_cli",
"bentoml_cli.worker",
]
[project.optional-dependencies]
all = [
"bentoml[aws]",
"bentoml[io-image]",
"bentoml[io-pandas]",
"bentoml[grpc]",
"bentoml[grpc-reflection]",
"bentoml[grpc-channelz]",
"bentoml[tracing]",
]
aws = ["fs-s3fs"]
io-image = ["Pillow"]
io-pandas = ["pandas", "pyarrow"]
grpc = [
# Restrict maximum version due to breaking protobuf 4.21.0 changes
# (see https://github.com/protocolbuffers/protobuf/issues/10051)
# 3.19.5 is currently breaking on a lot of system.
"protobuf>=3.5.0, <3.20, !=3.19.5",
# Lowest version that support 3.10. We need to set an upper bound
# since grpcio >=1.49.0 uses protbuf >=3.20.0, which breaks compatibility.
# We can't use 1.48.2 since it depends on 3.19.5
"grpcio>=1.41.0, <1.49, !=1.48.2",
"grpcio-health-checking>=1.41.0, <1.49, !=1.48.2",
"opentelemetry-instrumentation-grpc==0.33b0",
]
grpc-reflection = [
"bentoml[grpc]",
"grpcio-reflection>=1.41.0, <1.49, !=1.48.2",
]
grpc-channelz = ["bentoml[grpc]", "grpcio-channelz>=1.41.0, <1.49, !=1.48.2"]
# We kept for compatibility with previous
# versions of BentoML. It is discouraged to use this, instead use any
# of the above tracing.* extras.
tracing = [
"bentoml[tracing-jaeger]",
"bentoml[tracing-otlp]",
"bentoml[tracing-zipkin]",
]
tracing-jaeger = ["opentelemetry-exporter-jaeger"]
tracing-zipkin = ["opentelemetry-exporter-zipkin"]
tracing-otlp = ["opentelemetry-exporter-otlp"]
[tool.setuptools_scm]
write_to = "src/bentoml/_version.py"
git_describe_command = "git describe --dirty --tags --long --first-parent"
version_scheme = "post-release"
fallback_version = "0.0.0"
[tool.coverage.paths]
source = ["src"]
[tool.coverage.run]
branch = true
source = ["src/bentoml/"]
omit = [
"src/bentoml/__main__.py",
"src/bentoml/io.py",
"src/bentoml/serve.py",
"src/bentoml/start.py",
"src/bentoml/_internal/types.py",
"src/bentoml/testing/*",
"src/bentoml/grpc/v1alpha1/*",
"src/bentoml/_internal/external_typing/*",
"src/bentoml/_internal/yatai_client/*",
"src/bentoml/_internal/yatai_rest_api_client/*",
]
[tool.coverage.report]
show_missing = true
precision = 2
omit = [
'src/bentoml/__main__.py',
"src/bentoml/io.py",
"src/bentoml/serve.py",
"src/bentoml/start.py",
"src/bentoml/_internal/types.py",
"src/bentoml/testing/*",
"src/bentoml/grpc/v1alpha1/*",
"src/bentoml/_internal/external_typing/*",
"src/bentoml/_internal/yatai_client/*",
"src/bentoml/_internal/yatai_rest_api_client/*",
]
exclude_lines = [
"\\#\\s*pragma: no cover",
"^\\s*def __repr__",
"^\\s*raise AssertionError",
"^\\s*raise NotImplementedError",
"^\\s*raise MissingDependencyException",
"^\\s*except ImportError",
"if __name__ == .__main__.:",
"^\\s*if TYPE_CHECKING:",
"^\\s*@overload( |$)",
]
[tool.black]
line-length = 88
exclude = '''
(
/(
\.eggs
| \.git
| \.tox
| \.venv
| _build
| .build
| bazel-*
| build
| venv
| lib
| dist
| typings
| src/bentoml/grpc/v1alpha1
| grpc-client/thirdparty
)/
| src/bentoml/_version.py
)
'''
[tool.pytest.ini_options]
addopts = ["-rfEX", "-pbentoml.testing.pytest.plugin"]
python_files = ["test_*.py", "*_test.py"]
testpaths = ["tests"]
[tool.pylint.main]
recursive = true
extension-pkg-allow-list = [
"numpy",
"tensorflow",
"torch",
"paddle",
"onnxruntime",
"onnx",
"pydantic.schema",
]
ignore-paths = [
"src/bentoml/_internal/external_typing",
"src/bentoml/grpc/v1alpha1",
]
disable = ["coerce-builtin", "no-absolute-import", "C", "R"]
enable = ["c-extension-no-member"]
evaluation = "10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)"
msg-template = "{msg_id}:{symbol} [{line:0>3d}:{column:0>2d}] {obj}: {msg}"
output-format = "colorized"
score = true
[tool.pylint.classes]
valid-metaclass-classmethod-first-arg = ["cls", "mcls", "kls"]
[tool.pylint.logging]
logging-format-style = "old" # using %s formatter for logging (performance-related)
[tool.pylint.miscellaneous]
notes = ["FIXME", "XXX", "TODO", "NOTE", "WARNING"]
[tool.pylint.refactoring]
# specify functions that should not return
never-returning-functions = ["sys.exit"]
[tool.pylint.spelling]
spelling-ignore-comment-directives = "fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:,pylint:,type:"
[tool.pylint.variables]
init-import = true
[tool.pylint.typecheck]
contextmanager-decorators = [
"contextlib.contextmanager",
"bentoml._internal.utils.cached_contextmanager",
]
[tool.isort]
profile = "black"
line_length = 88
length_sort = true
force_single_line = true
order_by_type = true
known_first_party = "bentoml"
force_alphabetical_sort_within_sections = true
skip_glob = [
"typings/*",
"test/*",
"**/*_pb2.py*",
"**/*_pb2_grpc.py*",
"venv/*",
"lib/*",
"grpc-client/thirdparty",
"bazel-*",
]
[tool.pyright]
pythonVersion = "3.10"
include = ["src/bentoml", "src/bentoml_cli"]
exclude = [
'src/bentoml/_version.py',
'src/bentoml/__main__.py',
'src/bentoml/_internal/external_typing/',
'src/**/*_pb2.py*',
"src/**/*_pb2_grpc.py*",
"grpc-client/thirdparty",
"bazel-*",
]
analysis.useLibraryCodeForTypes = true
strictListInference = true
strictDictionaryInference = true
strictSetInference = true
strictParameterNoneValue = true
enableTypeIgnoreComments = true
reportGeneralTypeIssues = "error"
reportPropertyTypeMismatch = "error"
reportFunctionMemberAccess = "error"
reportMissingImports = "warning"
reportMissingModuleSource = "warning"
reportMissingTypeStubs = "warning"
reportUnusedImport = "error"
reportUnusedClass = "error"
reportUnusedFunction = "error"
reportUnusedVariable = "error"
reportDuplicateImport = "error"
reportWildcardImportFromLibrary = "error"
reportOptionalSubscript = "error"
reportOptionalMemberAccess = "error"
reportOptionalCall = "error"
reportOptionalIterable = "error"
reportOptionalContextManager = "error"
reportOptionalOperand = "error"
reportTypedDictNotRequiredAccess = "error"
reportUntypedFunctionDecorator = "error"
reportUntypedClassDecorator = "error"
reportUntypedBaseClass = "error"
reportUntypedNamedTuple = "error"
reportPrivateUsage = "error"
reportPrivateImportUsage = "error"
reportConstantRedefinition = "error"
reportIncompatibleMethodOverride = "error"
reportIncompatibleVariableOverride = "error"
reportOverlappingOverload = "error"
reportUninitializedInstanceVariable = "none"
reportInvalidStringEscapeSequence = "error"
reportUnknownParameterType = "error"
reportUnknownArgumentType = "error"
reportUnknownLambdaType = "error"
reportUnknownVariableType = "error"
reportUnknownMemberType = "warning"
reportMissingParameterType = "error"
reportMissingTypeArgument = "error"
reportInvalidTypeVarUse = "error"
reportCallInDefaultInitializer = "none"
reportUnnecessaryIsInstance = "warning"
reportUnnecessaryCast = "error"
reportUnnecessaryComparison = "error"
reportAssertAlwaysTrue = "error"
reportSelfClsParameterName = "error"
reportImplicitStringConcatenation = "none"
reportUndefinedVariable = "error"
reportUnboundVariable = "error"
reportInvalidStubStatement = "error"
reportIncompleteStub = "error"
reportUnsupportedDunderAll = "error"
reportUnusedCallResult = "none"
reportUnusedCoroutine = "error"