pyproject.toml 4.97 KB
Newer Older
1
[build-system]
2
# Should be mirrored in requirements/build.txt
3
requires = [
4
    "cmake>=3.26",
5
6
    "ninja",
    "packaging",
7
8
    "setuptools>=61",
    "setuptools-scm>=8.0",
Michael Goin's avatar
Michael Goin committed
9
    "torch == 2.6.0",
10
    "wheel",
11
    "jinja2",
12
13
]
build-backend = "setuptools.build_meta"
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
[project]
name = "vllm"
authors = [{name = "vLLM Team"}]
license = { "file"= "LICENSE" }
readme = "README.md"
description = "A high-throughput and memory-efficient inference and serving engine for LLMs"
classifiers = [
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "License :: OSI Approved :: Apache Software License",
    "Intended Audience :: Developers",
    "Intended Audience :: Information Technology",
    "Intended Audience :: Science/Research",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
    "Topic :: Scientific/Engineering :: Information Analysis",
]
requires-python = ">=3.9"
dynamic = [ "version", "dependencies", "optional-dependencies"]

[project.urls]
Homepage="https://github.com/vllm-project/vllm"
Documentation="https://vllm.readthedocs.io/en/latest/"
Slack="http://slack.vllm.ai/"

[project.scripts]
vllm = "vllm.entrypoints.cli.main:main"

44
[tool.setuptools_scm]
45
# no extra settings needed, presence enables setuptools-scm
46
47
48
49
50

[tool.setuptools.packages.find]
where = ["."]
exclude = ["benchmarks", "csrc", "docs", "examples", "tests*"]
namespaces = false
51

52
53
54
55
56
[tool.yapfignore]
ignore_patterns = [
    "build/**",
]

57
58
59
[tool.ruff]
# Allow lines to be as long as 80.
line-length = 80
60
61
exclude = [
    # External file, leaving license intact
62
    "examples/other/fp8/quantizer/quantize.py"
63
]
64

65
[tool.ruff.lint.per-file-ignores]
66
"vllm/third_party/**" = ["ALL"]
67
68
"vllm/version.py" = ["F401"]
"vllm/_version.py" = ["ALL"]
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Python 3.8 typing. TODO: Remove these excludes after v1.0.0
"vllm/adapter_commons/**/*.py" = ["UP006", "UP035"]
"vllm/attention/**/*.py" = ["UP006", "UP035"]
"vllm/compilation/**/*.py" = ["UP006", "UP035"]
"vllm/core/**/*.py" = ["UP006", "UP035"]
"vllm/device_allocator/**/*.py" = ["UP006", "UP035"]
"vllm/distributed/**/*.py" = ["UP006", "UP035"]
"vllm/engine/**/*.py" = ["UP006", "UP035"]
"vllm/executor/**/*.py" = ["UP006", "UP035"]
"vllm/lora/**/*.py" = ["UP006", "UP035"]
"vllm/model_executor/**/*.py" = ["UP006", "UP035"]
"vllm/platforms/**/*.py" = ["UP006", "UP035"]
"vllm/plugins/**/*.py" = ["UP006", "UP035"]
"vllm/profiler/**/*.py" = ["UP006", "UP035"]
"vllm/prompt_adapter/**/*.py" = ["UP006", "UP035"]
"vllm/spec_decode/**/*.py" = ["UP006", "UP035"]
"vllm/transformers_utils/**/*.py" = ["UP006", "UP035"]
"vllm/triton_utils/**/*.py" = ["UP006", "UP035"]
"vllm/vllm_flash_attn/**/*.py" = ["UP006", "UP035"]
"vllm/worker/**/*.py" = ["UP006", "UP035"]
89
"vllm/utils.py" = ["UP006", "UP035"]
90

91
92
93
94
95
96
97
[tool.ruff.lint]
select = [
    # pycodestyle
    "E",
    # Pyflakes
    "F",
    # pyupgrade
98
    "UP",
99
100
101
102
103
104
    # flake8-bugbear
    "B",
    # flake8-simplify
    "SIM",
    # isort
    # "I",
105
    "G",
106
107
108
109
110
111
]
ignore = [
    # star imports
    "F405", "F403",
    # lambda expression assignment
    "E731",
112
113
    # Loop control variable not used within loop body
    "B007",
114
115
    # f-string format
    "UP032",
116
117
    # Can remove once 3.10+ is the minimum Python version
    "UP007",
118
]
119
120
121

[tool.mypy]
ignore_missing_imports = true
122
check_untyped_defs = true
123
follow_imports = "silent"
124

125
# After fixing type errors resulting from follow_imports: "skip" -> "silent",
126
# move the directory here and remove it from tools/mypy.sh
127
128
129
130
files = [
    "vllm/*.py",
    "vllm/adapter_commons",
    "vllm/assets",
131
    "vllm/entrypoints",
132
    "vllm/core",
133
    "vllm/inputs",
134
    "vllm/logging_utils",
135
136
137
138
139
140
    "vllm/multimodal",
    "vllm/platforms",
    "vllm/transformers_utils",
    "vllm/triton_utils",
    "vllm/usage",
]
141
# TODO(woosuk): Include the code from Megatron and HuggingFace.
142
143
exclude = [
    "vllm/model_executor/parallel_utils/|vllm/model_executor/models/",
144
145
    # Ignore triton kernels in ops.
    'vllm/attention/ops/.*\.py$'
146
]
147
148

[tool.codespell]
149
ignore-words-list = "dout, te, indicies, subtile, ElementE"
150
skip = "tests/models/fixtures/*,tests/prompts/*,benchmarks/sonnet.txt,tests/lora/data/*,build/*,vllm/third_party/*"
151
152
153
154

[tool.isort]
use_parentheses = true
skip_gitignore = true
155
156
157
158

[tool.pytest.ini_options]
markers = [
    "skip_global_cleanup",
159
160
    "core_model: enable this model test in each PR instead of only nightly",
    "cpu_model: enable this model test in CPU tests",
161
    "quant_model: run this model test under Quantized category",
162
163
    "split: run this test as part of a split",
    "distributed: run this test only in distributed GPU tests",
Joe Runde's avatar
Joe Runde committed
164
    "skip_v1: do not run this test with v1",
165
    "optional: optional tests that are automatically skipped, include --optional to run them",
166
]
167
168

[tool.pymarkdown]
169
plugins.md004.style = "sublist" # ul-style
170
171
172
173
plugins.md013.enabled = false # line-length
plugins.md041.enabled = false # first-line-h1
plugins.md033.enabled = false # inline-html
plugins.md024.allow_different_nesting = true # no-duplicate-headers