pyproject.toml 2.82 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",
9
    "torch == 2.5.1",
10
    "wheel",
11
    "jinja2",
12
13
]
build-backend = "setuptools.build_meta"
14

15
16
17
[tool.setuptools_scm]
# version_file = "vllm/_version.py" # currently handled by `setup.py:get_version()`

18
19
20
21
22
[tool.yapfignore]
ignore_patterns = [
    "build/**",
]

23
24
25
[tool.ruff]
# Allow lines to be as long as 80.
line-length = 80
26
27
exclude = [
    # External file, leaving license intact
28
    "examples/other/fp8/quantizer/quantize.py"
29
]
30

31
32
33
34
[tool.ruff.lint.per-file-ignores]
"vllm/version.py" = ["F401"]
"vllm/_version.py" = ["ALL"]

35
36
37
38
39
40
41
[tool.ruff.lint]
select = [
    # pycodestyle
    "E",
    # Pyflakes
    "F",
    # pyupgrade
42
    "UP",
43
44
45
46
47
48
    # flake8-bugbear
    "B",
    # flake8-simplify
    "SIM",
    # isort
    # "I",
49
    "G",
50
51
52
53
54
55
]
ignore = [
    # star imports
    "F405", "F403",
    # lambda expression assignment
    "E731",
56
57
    # Loop control variable not used within loop body
    "B007",
58
59
    # f-string format
    "UP032",
60
61
62
    # Python 3.8 typing
    "UP006", "UP035",

63
]
64
65
66

[tool.mypy]
ignore_missing_imports = true
67
check_untyped_defs = true
68
follow_imports = "silent"
69

70
# After fixing type errors resulting from follow_imports: "skip" -> "silent",
71
# move the directory here and remove it from tools/mypy.sh
72
73
74
75
files = [
    "vllm/*.py",
    "vllm/adapter_commons",
    "vllm/assets",
76
    "vllm/entrypoints",
77
    "vllm/core",
78
    "vllm/inputs",
79
    "vllm/logging_utils",
80
81
82
83
84
85
    "vllm/multimodal",
    "vllm/platforms",
    "vllm/transformers_utils",
    "vllm/triton_utils",
    "vllm/usage",
]
86
# TODO(woosuk): Include the code from Megatron and HuggingFace.
87
88
exclude = [
    "vllm/model_executor/parallel_utils/|vllm/model_executor/models/",
89
90
    # Ignore triton kernels in ops.
    'vllm/attention/ops/.*\.py$'
91
]
92
93

[tool.codespell]
94
ignore-words-list = "dout, te, indicies, subtile, ElementE"
95
skip = "./tests/models/fixtures,./tests/prompts,./benchmarks/sonnet.txt,./tests/lora/data,./build"
96
97
98
99

[tool.isort]
use_parentheses = true
skip_gitignore = true
100
101
102
103

[tool.pytest.ini_options]
markers = [
    "skip_global_cleanup",
104
105
    "core_model: enable this model test in each PR instead of only nightly",
    "cpu_model: enable this model test in CPU tests",
106
    "quant_model: run this model test under Quantized category",
107
108
    "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
109
    "skip_v1: do not run this test with v1",
110
    "optional: optional tests that are automatically skipped, include --optional to run them",
111
]
112
113

[tool.pymarkdown]
114
plugins.md004.style = "sublist" # ul-style
115
116
117
118
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