forked from huggingface/trl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
174 lines (162 loc) · 3.59 KB
/
pyproject.toml
File metadata and controls
174 lines (162 loc) · 3.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
[build-system]
requires = ["setuptools >= 77.0.3"]
build-backend = "setuptools.build_meta"
[project]
name = "trl"
description = "Train transformer language models with reinforcement learning."
authors = [
{ name = "Leandro von Werra", email = "leandro.vonwerra@gmail.com" }
]
readme = { file = "README.md", content-type = "text/markdown" }
license = "Apache-2.0"
license-files = ["LICENSE"]
keywords = [
"transformers", "huggingface", "language modeling", "post-training", "rlhf", "sft", "dpo", "grpo"
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13"
]
requires-python = ">=3.10"
dependencies = [
"accelerate>=1.4.0",
"datasets>=3.0.0",
"packaging>20.0",
"transformers>=4.56.2",
]
dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/huggingface/trl"
[project.scripts]
trl = "trl.cli:main"
[project.optional-dependencies]
bco = [
"scikit-learn",
"joblib"
]
deepspeed = [
"deepspeed>=0.14.4"
]
judges = [
"openai>=1.23.2",
"llm-blender>=0.0.2"
]
kernels = [
"kernels"
]
liger = [
"liger-kernel>=0.6.4"
]
peft = [
"peft>=0.8.0"
]
quality = [
"pre-commit",
"hf-doc-builder"
]
quantization = [
"bitsandbytes"
]
scikit = [
"scikit-learn"
]
test = [
"pytest-cov",
"pytest-datadir>=1.7.0", # lazy datadirs
"pytest-rerunfailures==15.1",
"pytest-xdist",
"pytest"
]
vllm = [
"vllm>=0.10.2,<0.13.0",
"fastapi",
"pydantic",
"requests",
"uvicorn"
]
vlm = [
"Pillow",
"torchvision",
"num2words==0.5.14"
]
math_verify = [
"math-verify>=0.5.2",
]
dev = [
# bco
"scikit-learn",
"joblib",
# deepspeed
"deepspeed>=0.14.4",
# judges
"openai>=1.23.2",
"llm-blender>=0.0.2",
# kernels
"kernels",
# liger
"liger-kernel>=0.6.4",
# peft
"peft>=0.8.0",
# quality
"pre-commit",
"hf-doc-builder",
# quantization
"bitsandbytes",
# scikit: included in bco
# test
"pytest-cov",
"pytest-datadir>=1.7.0", # lazy datadirs
"pytest-rerunfailures==15.1",
"pytest-xdist",
"pytest",
# vllm: not included in dev by default due to CUDA error; see GH-4228
# vlm
"Pillow",
"torchvision",
"num2words==0.5.14",
# for response parsing (required for training with tools)
"jmespath",
]
[tool.setuptools]
package-dir = {"trl" = "trl"}
[tool.setuptools.dynamic]
version = { file = "VERSION" }
[tool.coverage.run]
branch = true
[tool.ruff]
target-version = "py310"
line-length = 119
src = ["trl"]
[tool.ruff.lint]
ignore = [
"B028", # warning without explicit stacklevel
"C408", # dict() calls (stylistic)
"C901", # function complexity
"E501",
]
extend-select = ["E", "F", "I", "W", "UP", "B", "T", "C"]
[tool.ruff.lint.per-file-ignores]
# Allow prints in auxiliary scripts
"examples/**.py" = ["T201"]
"scripts/**.py" = ["T201"]
# Ignore import violations in all `__init__.py` files.
"__init__.py" = ["F401"]
[tool.ruff.lint.isort]
lines-after-imports = 2
known-first-party = ["trl"]
[tool.pytest.ini_options]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"low_priority: marks tests as low priority (deselect with '-m \"not low_priority\"')"
]
addopts = [
"-k", "not experimental",
]