pyproject.toml 2.32 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
[tool.ruff]
# Allow lines to be as long as 80.
line-length = 80
21
22
23
24
exclude = [
    # External file, leaving license intact
    "examples/fp8/quantizer/quantize.py"
]
25

26
27
28
29
[tool.ruff.lint.per-file-ignores]
"vllm/version.py" = ["F401"]
"vllm/_version.py" = ["ALL"]

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

[tool.mypy]
ignore_missing_imports = true
59
check_untyped_defs = true
60
follow_imports = "silent"
61

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

[tool.codespell]
86
ignore-words-list = "dout, te, indicies, subtile"
87
skip = "./tests/models/fixtures,./tests/prompts,./benchmarks/sonnet.txt,./tests/lora/data,./build"
88
89
90
91

[tool.isort]
use_parentheses = true
skip_gitignore = true
92
93
94
95

[tool.pytest.ini_options]
markers = [
    "skip_global_cleanup",
96
97
    "core_model: enable this model test in each PR instead of only nightly",
    "cpu_model: enable this model test in CPU tests",
98
    "quant_model: run this model test under Quantized category",
99
    "distributed_2_gpus: run this test only in distributed tests for 2 GPUs",
Joe Runde's avatar
Joe Runde committed
100
    "skip_v1: do not run this test with v1",
101
]