pyproject.toml 4.65 KB
Newer Older
1
[build-system]
2
# Should be mirrored in requirements/build.txt
3
requires = [
4
    "cmake>=3.26.1",
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
    "jinja2",
12
13
]
build-backend = "setuptools.build_meta"
14

15
16
17
[project]
name = "vllm"
authors = [{name = "vLLM Team"}]
18
19
license = "Apache-2.0"
license-files = ["LICENSE"]
20
21
22
23
24
25
26
27
28
29
30
31
32
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
33
requires-python = ">=3.9,<3.13"
34
35
36
37
dynamic = [ "version", "dependencies", "optional-dependencies"]

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

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

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

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

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

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

62
63
64
65
[tool.ruff]
# Allow lines to be as long as 80.
line-length = 80

66
[tool.ruff.lint.per-file-ignores]
67
"vllm/third_party/**" = ["ALL"]
68
69
"vllm/version.py" = ["F401"]
"vllm/_version.py" = ["ALL"]
70
# Python 3.8 typing - skip V0 code
71
72
73
74
75
76
77
"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"]
78
# Python 3.8 typing - skip utils for ROCm
79
"vllm/utils/__init__.py" = ["UP006", "UP035"]
80

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

[tool.mypy]
112
plugins = ['pydantic.mypy']
113
ignore_missing_imports = true
114
check_untyped_defs = true
115
follow_imports = "silent"
116

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

140
[tool.isort]
141
142
143
skip_glob = [
    ".buildkite/*",
    "benchmarks/*",
144
    "examples/*",
145
]
146
147
use_parentheses = true
skip_gitignore = true
148
149
150
151

[tool.pytest.ini_options]
markers = [
    "skip_global_cleanup",
152
    "core_model: enable this model test in each PR instead of only nightly",
153
    "hybrid_model: models that contain mamba layers (including pure SSM and hybrid architectures)",
154
    "cpu_model: enable this model test in CPU tests",
155
156
    "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
157
    "skip_v1: do not run this test with v1",
158
    "optional: optional tests that are automatically skipped, include --optional to run them",
159
]
160
161

[tool.pymarkdown]
162
plugins.md004.style = "sublist" # ul-style
163
plugins.md007.indent = 4 # ul-indent
164
plugins.md007.start_indented = true # ul-indent
165
166
167
plugins.md013.enabled = false # line-length
plugins.md041.enabled = false # first-line-h1
plugins.md033.enabled = false # inline-html
168
plugins.md046.enabled = false # code-block-style
169
plugins.md024.allow_different_nesting = true # no-duplicate-headers
Aaron Pham's avatar
Aaron Pham committed
170

171
172
[tool.ty.src]
root = "./vllm"
Aaron Pham's avatar
Aaron Pham committed
173
174
175
176
respect-ignore-files = true

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