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

15
16
17
[tool.ruff]
# Allow lines to be as long as 80.
line-length = 80
18
19
20
21
exclude = [
    # External file, leaving license intact
    "examples/fp8/quantizer/quantize.py"
]
22

23
24
25
26
[tool.ruff.lint.per-file-ignores]
"vllm/version.py" = ["F401"]
"vllm/_version.py" = ["ALL"]

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

[tool.mypy]
python_version = "3.8"

ignore_missing_imports = true
58
check_untyped_defs = true
59
follow_imports = "silent"
60

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

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

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

[tool.pytest.ini_options]
markers = [
    "skip_global_cleanup",
95
96
    "core_model: run this model test in each PR instead of just daily",
    "distributed_2_gpus: run this test only in distributed tests for 2 GPUs",
97
]