pyproject.toml 1.93 KB
Newer Older
Rayyyyy's avatar
V0.6.3  
Rayyyyy committed
1
2
3
4
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

chenych's avatar
chenych committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[project]
name = "llamafactory"
dynamic = [
    "version",
    "dependencies",
    "optional-dependencies",
    "requires-python",
    "scripts",
    "authors",
    "description",
    "readme",
    "license",
    "keywords",
    "classifiers"
]

Rayyyyy's avatar
V0.6.3  
Rayyyyy committed
21
[tool.ruff]
chenych's avatar
chenych committed
22
target-version = "py39"
Rayyyyy's avatar
V0.6.3  
Rayyyyy committed
23
24
25
26
line-length = 119
indent-width = 4

[tool.ruff.lint]
chenych's avatar
chenych committed
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
ignore = [
    "C408", # collection
    "C901", # complex
    "E501", # line too long
    "E731", # lambda function
    "E741", # ambiguous var name
    "D100", # no doc public module
    "D101", # no doc public class
    "D102", # no doc public method
    "D103", # no doc public function
    "D104", # no doc public package
    "D105", # no doc magic method
    "D107", # no doc __init__
]
extend-select = [
    "C",      # complexity
    "E",      # error
    "F",      # pyflakes
    "I",      # isort
    "W",      # warning
    "UP",     # pyupgrade
    "D",      # pydocstyle
    "PT009",  # pytest assert
    "RUF022", # sort __all__
]
Rayyyyy's avatar
V0.6.3  
Rayyyyy committed
52
53
54

[tool.ruff.lint.isort]
lines-after-imports = 2
chenych's avatar
chenych committed
55
known-first-party = ["llamafactory"]
Rayyyyy's avatar
V0.6.3  
Rayyyyy committed
56
57
58
59
60
61
62
63
known-third-party = [
    "accelerate",
    "datasets",
    "gradio",
    "numpy",
    "peft",
    "torch",
    "transformers",
chenych's avatar
chenych committed
64
    "trl",
Rayyyyy's avatar
V0.6.3  
Rayyyyy committed
65
66
]

chenych's avatar
chenych committed
67
68
69
[tool.ruff.lint.pydocstyle]
convention = "google"

Rayyyyy's avatar
V0.6.3  
Rayyyyy committed
70
71
72
73
74
75
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
skip-magic-trailing-comma = false
line-ending = "auto"
chenych's avatar
chenych committed
76
77
78
79
80
81
82
83
84
85
86
87
88
89

[tool.uv]
conflicts = [
    [
        { extra = "torch-npu" },
        { extra = "aqlm" },
    ],
    [
        { extra = "torch-npu" },
        { extra = "liger-kernel" },
    ],
    [
        { extra = "torch-npu" },
        { extra = "vllm" },
chenych's avatar
chenych committed
90
    ],
mashun1's avatar
mashun1 committed
91
92
93
94
95
96
97
98
    [
        { extra = "torch-npu" },
        { extra = "sglang" },
    ],
    [
        { extra = "vllm" },
        { extra = "sglang" },
    ],
chenych's avatar
chenych committed
99
100
101
102
    [
        { extra = "sglang" },
        { extra = "minicpm_v" },
    ],
chenych's avatar
chenych committed
103
]