-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathpyproject.toml
More file actions
175 lines (158 loc) · 4.15 KB
/
pyproject.toml
File metadata and controls
175 lines (158 loc) · 4.15 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
[project]
name = "vec-inf"
version = "0.9.0"
description = "Efficient LLM inference on Slurm clusters using vLLM."
readme = "README.md"
authors = [{name = "Marshall Wang", email = "marshall.wang@vectorinstitute.ai"}]
license = "MIT"
requires-python = ">=3.10"
dependencies = [
"requests>=2.31.0",
"click>=8.1.0",
"rich>=13.7.0",
"pydantic>=2.10.6",
"pyyaml>=6.0.2",
]
[dependency-groups]
dev = [
"codecov>=2.1.13",
"mypy>=1.15.0",
"nbqa>=1.9.1",
"openai>=1.65.1",
"pip-audit>=2.8.0",
"pre-commit>=4.1.0",
"pytest>=8.3.4",
"pytest-asyncio>=0.25.3",
"pytest-cov>=6.0.0",
"pytest-mock>=3.14.0",
"ruff>=0.9.6",
]
docs = [
"mkdocs>=1.5.3",
"mkdocs-material>=9.5.12",
"mkdocstrings>=0.24.1",
"mkdocstrings-python>=1.8.0",
"pymdown-extensions>=10.7.1",
"mike>=2.0.0",
]
# Common inference dependencies (shared by both backends)
inference = [
"xgrammar>=0.1.11",
"torch>=2.7.0",
"cupy-cuda12x>=12.3.0",
"flashinfer-python>=0.4.0",
"ax-platform>=1.1.0",
"py3nvml",
"wandb>=0.17.0",
]
[project.optional-dependencies]
# vLLM inference backend (conflicts with sglang due to dependency version conflicts)
# Install with: uv sync --extra vllm --group inference
vllm = [
"vllm>=0.11.2",
"ray[default]>=2.51.0",
"vllm[audio]",
"vllm[bench]",
"torchcodec>=0.9.0,<0.10.0",
]
# SGLang inference backend (conflicts with vllm due to dependency version conflicts)
# Install with: uv sync --extra sglang --group inference
sglang = [
"sglang>=0.5.5",
"sgl_kernel>=0.3.0",
"orjson>=3.11.0",
"torchao>=0.9.0",
]
[tool.uv]
# Declare that vllm and sglang extras are mutually exclusive
# This prevents uv from trying to resolve both together in the lock file
conflicts = [
[
{ extra = "vllm" },
{ extra = "sglang" },
],
]
[project.scripts]
vec-inf = "vec_inf.cli._cli:cli"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["vec_inf"]
[tool.mypy]
ignore_missing_imports = true
install_types = true
pretty = true
namespace_packages = true
explicit_package_bases = true
non_interactive = true
warn_unused_configs = true
allow_any_generics = false
allow_subclassing_any = false
allow_untyped_calls = false
allow_untyped_defs = false
allow_incomplete_defs = false
check_untyped_defs = true
allow_untyped_decorators = false
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
implicit_reexport = false
strict_equality = true
extra_checks = true
[tool.ruff]
include = ["*.py", "pyproject.toml", "*.ipynb"]
line-length = 88
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"COM", # flake8-commas
"C4", # flake8-comprehensions
"RET", # flake8-return
"SIM", # flake8-simplify
"ICN", # flake8-import-conventions
"Q", # flake8-quotes
"RSE", # flake8-raise
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"W", # pycodestyle
"N", # pep8-naming
"ERA", # eradicate
"PL", # pylint
]
fixable = ["A", "B", "COM", "C4", "RET", "SIM", "ICN", "Q", "RSE", "D", "E", "F", "I", "W", "N", "ERA", "PL"]
ignore = [
"B905", # `zip()` without an explicit `strict=` parameter
"E501", # line too long
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"PLR2004", # Replace magic number with named constant
"PLR0913", # Too many arguments
"COM812", # Missing trailing comma
]
# Ignore import violations in all `__init__.py` files.
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401", "F403", "F811"]
[tool.ruff.lint.pep8-naming]
ignore-names = ["X*", "setUp"]
[tool.ruff.lint.isort]
lines-after-imports = 2
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.pycodestyle]
max-doc-length = 88
[tool.pytest.ini_options]
markers = [
"integration_test: marks tests as integration tests",
]
[tool.coverage]
[tool.coverage.run]
source=["vec_inf"]
omit=["tests/*", "*__init__.py"]