-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
231 lines (213 loc) · 5.66 KB
/
pyproject.toml
File metadata and controls
231 lines (213 loc) · 5.66 KB
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
[build-system]
requires = ["setuptools==78.1.1", "wheel==0.46.3"]
build-backend = "setuptools.build_meta"
[project]
name = "inference-endpoint"
version = "0.1.0"
description = "High-performance LLM endpoint benchmarking system with 50k QPS capability"
readme = "README.md"
license = {text = "Apache-2.0"}
authors = [
{name = "MLPerf Inference Endpoint Team"}
]
keywords = ["mlperf", "benchmarking", "llm", "endpoint", "performance"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Testing",
"Topic :: System :: Benchmark",
]
requires-python = ">=3.12"
dependencies = [
# Core Python dependencies
"typing-extensions==4.15.0",
# System utilities
"psutil==7.2.2",
# Async and networking
"pyzmq==27.1.0",
"uvloop==0.22.1",
"httptools==0.7.1",
"websocket-client==1.9.0",
# Data handling
"duckdb==1.5.1",
"msgspec==0.20.0",
"pydantic==2.12.5",
"pydantic_core==2.41.5",
# YAML/CLI from Pydantic Schema
"cyclopts==4.10.0",
"rich==14.3.3",
# Needed for tokenization and OSL reporting
"transformers==5.5.0",
"numpy==2.4.4",
"datasets==4.8.4",
"Pillow==12.1.1",
"sentencepiece==0.2.1",
"protobuf==7.34.1",
"openai_harmony==0.0.8",
# Color support for cross-platform terminals
"colorama==0.4.6",
# Fix pytz-2024 import warning
"pytz==2026.1.post1",
]
[project.optional-dependencies]
sql = [
# SQL event logger (swappable backends, default sqlite)
"sqlalchemy==2.0.48",
]
dev = [
# Code quality
"ruff==0.15.8",
# Development tools
"pre-commit==4.5.1",
# Profiling tools
"line-profiler==5.0.2",
"Pympler==1.1",
# Documentation
"sphinx==9.1.0",
"sphinx-rtd-theme==3.1.0",
"sphinx-autodoc-typehints==3.9.11",
"myst-parser==5.0.0",
# Security auditing
"pip-audit==2.10.0",
]
test = [
# Includes optional dependencies for full test coverage
"inference-endpoint[sql]",
# Testing framework
"pytest==9.0.2",
"pytest-asyncio==1.3.0",
"pytest-cov==7.1.0",
"pytest-benchmark==5.2.3",
"pytest-timeout==2.4.0",
"pytest-xdist==3.8.0",
# Test utilities
"coverage==7.13.4",
"line-profiler==5.0.2",
"Pympler==1.1",
"scipy==1.17.1",
# HTTP server and client for mock server fixture
"aiohttp==3.13.5",
# Plotting for benchmark sweep mode
"matplotlib==3.10.8",
]
performance = [
"pytest-benchmark==5.2.3",
"memory-profiler==0.61.0",
]
[project.scripts]
inference-endpoint = "inference_endpoint.main:run"
[project.urls]
Homepage = "https://github.com/mlperf/inference-endpoint"
Documentation = "https://github.com/mlperf/inference-endpoint#readme"
Repository = "https://github.com/mlperf/inference-endpoint.git"
Issues = "https://github.com/mlperf/inference-endpoint/issues"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-dir]
"" = "src"
[tool.setuptools.package-data]
inference_endpoint = ["config/templates/*.yaml"]
[tool.setuptools.exclude-package-data]
"inference_endpoint.evaluation.livecodebench" = ["_server.py"]
[tool.autopep8]
max_line_length = 88
[tool.ruff]
target-version = "py312"
line-length = 88
exclude = [
"tests/datasets/*",
"src/inference_endpoint/openai/openai_types_gen.py",
"src/inference_endpoint/openai/openapi.yaml",
"datasets/*",
"datasets/",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long, handled by ruff-format
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
asyncio_mode = "strict"
timeout = 300
timeout_func_only = true
addopts = [
"--strict-markers",
"--strict-config",
"--cov=src",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
"-m not run_explicitly",
]
markers = [
"slow: marks tests as slow (skip in CI)",
"performance: marks tests as performance tests (skip in CI) - no timeout",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
"run_explicitly: mark test to only run explicitly",
]
filterwarnings = [
"ignore:Session timeout reached:RuntimeWarning",
]
[tool.coverage.run]
source = ["src"]
concurrency = ["multiprocessing", "thread"]
parallel = true
sigterm = true
omit = [
"*/tests/*",
"*/test_*",
"*/__pycache__/*",
"*/venv/*",
"*/\\.venv/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\\\bProtocol\\):",
"@(abc\\\\.)?abstractmethod",
]
[tool.mypy]
ignore_missing_imports = true
exclude = [
"openai_types_gen\\.py$",
"metrics/reporter\\.py$",
]
[[tool.mypy.overrides]]
module = [
"inference_endpoint.openai.openai_types_gen",
"inference_endpoint.metrics.reporter",
]
ignore_errors = true