pyproject.toml 4.82 KB
Newer Older
1
[build-system]
2
# Should be mirrored in requirements/build.txt
3
requires = [
4
    "cmake>=3.26",
5
    "ninja",
6
7
    "packaging>=24.2",
    "setuptools>=77.0.3,<80.0.0",
8
    "setuptools-scm>=8.0",
Huy Do's avatar
Huy Do committed
9
    "torch == 2.7.0",
10
    "wheel",
11
    "regex",
12
    "jinja2",
13
14
]
build-backend = "setuptools.build_meta"
15

16
17
18
[project]
name = "vllm"
authors = [{name = "vLLM Team"}]
19
20
license = "Apache-2.0"
license-files = ["LICENSE"]
21
22
23
24
25
26
27
28
29
30
31
32
33
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",
    "Intended Audience :: Developers",
    "Intended Audience :: Information Technology",
    "Intended Audience :: Science/Research",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
    "Topic :: Scientific/Engineering :: Information Analysis",
]
Martin Hoyer's avatar
Martin Hoyer committed
34
requires-python = ">=3.9,<3.13"
35
36
37
38
dynamic = [ "version", "dependencies", "optional-dependencies"]

[project.urls]
Homepage="https://github.com/vllm-project/vllm"
39
40
Documentation="https://docs.vllm.ai/en/latest/"
Slack="https://slack.vllm.ai/"
41
42
43
44

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

45
46
47
[project.entry-points."vllm.general_plugins"]
lora_filesystem_resolver = "vllm.plugins.lora_resolvers.filesystem_resolver:register_filesystem_resolver"

48
[tool.setuptools_scm]
49
# no extra settings needed, presence enables setuptools-scm
50
51
52

[tool.setuptools.packages.find]
where = ["."]
53
include = ["vllm*"]
54

55
56
[tool.yapfignore]
ignore_patterns = [
57
    ".buildkite/**",
58
    "benchmarks/**",
59
60
61
    "build/**",
]

62
63
64
[tool.ruff]
# Allow lines to be as long as 80.
line-length = 80
65
66
exclude = [
    # External file, leaving license intact
67
68
    "examples/other/fp8/quantizer/quantize.py",
    "vllm/vllm_flash_attn/flash_attn_interface.pyi"
69
]
70

71
[tool.ruff.lint.per-file-ignores]
72
"vllm/third_party/**" = ["ALL"]
73
74
"vllm/version.py" = ["F401"]
"vllm/_version.py" = ["ALL"]
75
# Python 3.8 typing - skip V0 code
76
77
78
79
80
81
82
"vllm/attention/**/*.py" = ["UP006", "UP035"]
"vllm/core/**/*.py" = ["UP006", "UP035"]
"vllm/engine/**/*.py" = ["UP006", "UP035"]
"vllm/executor/**/*.py" = ["UP006", "UP035"]
"vllm/prompt_adapter/**/*.py" = ["UP006", "UP035"]
"vllm/spec_decode/**/*.py" = ["UP006", "UP035"]
"vllm/worker/**/*.py" = ["UP006", "UP035"]
83
# Python 3.8 typing - skip utils for ROCm
84
"vllm/utils.py" = ["UP006", "UP035"]
85

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

[tool.mypy]
ignore_missing_imports = true
118
check_untyped_defs = true
119
follow_imports = "silent"
120

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

[tool.codespell]
145
ignore-words-list = "dout, te, indicies, subtile, ElementE"
146
skip = "tests/models/fixtures/*,tests/prompts/*,benchmarks/sonnet.txt,tests/lora/data/*,build/*,vllm/third_party/*"
147
148

[tool.isort]
149
150
151
152
skip_glob = [
    ".buildkite/*",
    "benchmarks/*",
]
153
154
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
162
    "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
163
    "skip_v1: do not run this test with v1",
164
    "optional: optional tests that are automatically skipped, include --optional to run them",
165
]
166
167

[tool.pymarkdown]
168
plugins.md004.style = "sublist" # ul-style
169
plugins.md007.indent = 4 # ul-indent
170
plugins.md007.start_indented = true # ul-indent
171
172
173
plugins.md013.enabled = false # line-length
plugins.md041.enabled = false # first-line-h1
plugins.md033.enabled = false # inline-html
174
plugins.md046.enabled = false # code-block-style
175
plugins.md024.allow_different_nesting = true # no-duplicate-headers
Aaron Pham's avatar
Aaron Pham committed
176
177
178
179
180
181

[tool.ty]
respect-ignore-files = true

[tool.ty.environment]
python = "./.venv"