Skip to content

Commit 56a8f11

Browse files
Replace setup with pyproject and fix packaging unintended modules (#4194)
1 parent 5291015 commit 56a8f11

File tree

4 files changed

+129
-113
lines changed

4 files changed

+129
-113
lines changed

MANIFEST.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
include LICENSE
22
include CONTRIBUTING.md
33
include README.md
4-
recursive-exclude * __pycache__
4+
include trl/accelerate_configs/*.yaml
55
include trl/templates/*.md
6-
include trl/accelerate_configs/*.yaml
6+
recursive-exclude * __pycache__
7+
prune tests

pyproject.toml

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,129 @@
1+
[build-system]
2+
requires = ["setuptools >= 77.0.3"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "trl"
7+
description = "Train transformer language models with reinforcement learning."
8+
authors = [
9+
{ name = "Leandro von Werra", email = "[email protected]" }
10+
]
11+
readme = { file = "README.md", content-type = "text/markdown" }
12+
license = "Apache-2.0"
13+
license-files = ["LICENSE"]
14+
keywords = [
15+
"transformers", "huggingface", "language modeling", "post-training", "rlhf", "sft", "dpo", "grpo"
16+
]
17+
classifiers = [
18+
"Development Status :: 2 - Pre-Alpha",
19+
"Intended Audience :: Developers",
20+
"Intended Audience :: Science/Research",
21+
"Natural Language :: English",
22+
"Operating System :: OS Independent",
23+
"Programming Language :: Python :: 3",
24+
"Programming Language :: Python :: 3.9",
25+
"Programming Language :: Python :: 3.10",
26+
"Programming Language :: Python :: 3.11",
27+
"Programming Language :: Python :: 3.12",
28+
"Programming Language :: Python :: 3.13"
29+
]
30+
requires-python = ">=3.9"
31+
dependencies = [
32+
"accelerate>=1.4.0",
33+
"datasets>=3.0.0",
34+
"transformers>=4.56.1",
35+
"transformers!=4.57.0; python_version == '3.9'"
36+
]
37+
dynamic = ["version"]
38+
39+
[project.urls]
40+
Homepage = "https://github.com/huggingface/trl"
41+
42+
[project.scripts]
43+
trl = "trl.cli:main"
44+
45+
[project.optional-dependencies]
46+
bco = [
47+
"scikit-learn",
48+
"joblib"
49+
]
50+
deepspeed = [
51+
"deepspeed>=0.14.4"
52+
]
53+
judges = [
54+
"openai>=1.23.2",
55+
"llm-blender>=0.0.2"
56+
]
57+
liger = [
58+
"liger-kernel>=0.6.2"
59+
]
60+
peft = [
61+
"peft>=0.8.0"
62+
]
63+
quality = [
64+
"pre-commit",
65+
"hf-doc-builder"
66+
]
67+
quantization = [
68+
"bitsandbytes"
69+
]
70+
scikit = [
71+
"scikit-learn"
72+
]
73+
test = [
74+
"parameterized",
75+
"pytest-cov",
76+
"pytest-rerunfailures==15.1",
77+
"pytest-xdist",
78+
"pytest"
79+
]
80+
vllm = [
81+
"vllm==0.10.2",
82+
"fastapi",
83+
"pydantic",
84+
"requests",
85+
"uvicorn"
86+
]
87+
vlm = [
88+
"Pillow",
89+
"torchvision",
90+
"num2words==0.5.14"
91+
]
92+
dev = [
93+
"scikit-learn",
94+
"joblib",
95+
"deepspeed>=0.14.4",
96+
"openai>=1.23.2",
97+
"llm-blender>=0.0.2",
98+
"liger-kernel>=0.6.2",
99+
"peft>=0.8.0",
100+
"pre-commit",
101+
"hf-doc-builder",
102+
"bitsandbytes",
103+
"parameterized",
104+
"pytest-cov",
105+
"pytest-rerunfailures==15.1",
106+
"pytest-xdist",
107+
"pytest",
108+
"vllm==0.10.2",
109+
"fastapi",
110+
"pydantic",
111+
"requests",
112+
"uvicorn",
113+
"Pillow",
114+
"torchvision",
115+
"num2words==0.5.14"
116+
]
117+
118+
[tool.setuptools]
119+
package-dir = {"trl" = "trl"}
120+
121+
[tool.setuptools.dynamic]
122+
version = { file = "VERSION" }
123+
124+
[tool.coverage.run]
125+
branch = true
126+
1127
[tool.ruff]
2128
target-version = "py39"
3129
line-length = 119

setup.cfg

Lines changed: 0 additions & 93 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)