forked from microsoft/agent-lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
285 lines (260 loc) · 5.96 KB
/
pyproject.toml
File metadata and controls
285 lines (260 loc) · 5.96 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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
[project]
name = "agentlightning"
version = "0.2.2"
description = "Agent-lightning is the absolute trainer to light up AI agents."
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"graphviz",
"psutil",
"setproctitle",
"flask",
"agentops>=0.4.13",
"httpdbg",
"uvicorn",
"fastapi",
"aiohttp",
"opentelemetry-api>=1.35",
"opentelemetry-sdk>=1.35",
"opentelemetry-exporter-otlp>=1.35",
"litellm[proxy]>=1.74",
"pydantic>=2.11",
"openai",
"rich",
]
[project.optional-dependencies]
apo = [
"poml",
]
# It's not recommended to use agentlightning[verl] to install VERL and its dependencies.
# though it's listed here for completeness.
verl = [
"verl>=0.5.0",
"vllm>=0.8.4,<0.11.0", # Due to interface change of ExternalZeroMQDistributedExecutor
]
[project.scripts]
agl = "agentlightning.cli:main"
[dependency-groups]
dev = [
"flake8",
"pytest",
"hatch",
"pytest-asyncio",
"pre-commit",
"pytest-rerunfailures",
"black",
"isort",
"pyright",
"mkdocs",
"mkdocs-material",
"mkdocstrings[python]",
"mike",
"mkdocs-git-revision-date-localized-plugin",
"mkdocs-git-authors-plugin",
"mkdocs-macros-plugin",
"mkdocs-autorefs",
]
experiment = [
"random-word",
"gdown",
]
core-legacy = [
"agentops<=0.4.18",
"openai<2.0.0",
]
core-stable = [
"agentops>=0.4.21",
"openai>=2.0.0",
]
# For PyTorch.
# CPU and GPU groups.
torch-cpu = [
"torch",
"torchvision",
]
torch-cu128 = [
"torch",
"torchvision",
]
# Training-heavy dependencies.
torch-stable = [
{include-group = "core-stable"},
# This can work for both CPU and GPU.
"torch>=2.8.0",
"torchvision>=0.23.0",
"transformers>=4.55.0",
"vllm>=0.10.2",
# LiteLLM can then be upgraded with new vLLM
"litellm[proxy]>=1.78",
]
torch-legacy = [
{include-group = "core-legacy"},
# This can work for both CPU and GPU.
"torch==2.7.0",
"torchvision==0.22.0",
"transformers==4.53.3",
"tokenizers>=0.21,<0.22",
"flash-attn==2.8.1",
"vllm==0.9.2",
"litellm[proxy]==1.74.15",
]
# Flash-attention must build with CUDA toolkit.
# Use this instead of --group torch-stable --group torch-gpu
torch-gpu-stable = [
{include-group = "torch-stable"},
{include-group = "torch-cu128"},
"flash-attn>=2.8.3",
"tensordict>=0.9.1",
"verl>=0.6.0",
]
# Use this instead of --group torch-legacy --group torch-gpu
torch-gpu-legacy = [
{include-group = "torch-legacy"},
{include-group = "torch-cu128"},
"flash-attn==2.8.1",
"verl==0.5.0",
]
# For the TRL/Unsloth example.
trl = [
# Only work with PyTorch 2.8.0+.
{include-group = "torch-stable"},
# https://github.com/unslothai/unsloth/issues/3451
"unsloth>=2025.10.1,!=2025.10.2,!=2025.10.3,!=2025.10.4,!=2025.10.5,!=2025.10.6,!=2025.10.7,!=2025.10.8",
"unsloth_zoo>=2025.10.1,!=2025.10.2,!=2025.10.3,!=2025.10.4,!=2025.10.5,!=2025.10.6,!=2025.10.7,!=2025.10.8",
"bitsandbytes",
"peft",
"datasets",
"transformers",
"trl",
"kernels",
"vllm",
]
# For Tinker integration.
tinker = [
{include-group = "torch-stable"},
"tinker>=0.2.2",
"tinker_cookbook",
"wandb",
]
# Agent-related dependencies.
autogen = [
"autogen-agentchat",
"autogen-ext[openai]",
"mcp>=1.10.0",
# UV is required now by default.
# No need to include UV here.
# "uv",
]
openai-agents = [
"openai-agents",
"mcp",
]
anthropic = [
"anthropic",
]
langchain = [
"langgraph<1.0",
"langchain[openai]<1.0",
"langchain-community",
"langchain-text-splitters<1.0",
]
sql = [
"sqlparse",
"nltk",
]
crewai = [
"crewai[tools]>=1.2.0",
]
# Summarize into large installable groups.
agents = [
{include-group = "autogen"},
{include-group = "openai-agents"},
{include-group = "langchain"},
{include-group = "sql"},
{include-group = "anthropic"},
{include-group = "crewai"},
]
[tool.uv]
required-version = ">=0.9.5"
conflicts = [
[
{ group = "core-legacy" },
{ group = "core-stable" },
],
[
{ group = "torch-cpu" },
{ group = "torch-cu128" },
],
[
{ group = "torch-stable" },
{ group = "torch-legacy" },
],
]
environments = [
"sys_platform == 'linux'",
]
dependency-metadata = [
# Patch the dependencies of instructor to unpin "openai".
# This is a workaround for https://github.com/567-labs/instructor/issues/1852
{ name = "instructor", version = "1.11.3", requires-dist = ["openai", "pydantic", "docstring-parser", "typer", "rich", "aiohttp", "tenacity", "pydantic-core", "jiter", "jinja2", "requests", "diskcache"] },
]
override-dependencies = [
# A conflict between the dependency of litellm[proxy] and crewai[tools]
"mcp>=1.19.0",
"uvicorn>=0.38.0",
# Conflicts between packaging dependency of pyvers (dependency of tensordict) and agentops.
"packaging>=24.0",
]
[tool.uv.sources]
torch = [
{ index = "pytorch-cu128", group = "torch-cu128" },
{ index = "pytorch-cpu", group = "torch-cpu" },
]
tinker_cookbook = { git = "https://github.com/thinking-machines-lab/tinker-cookbook", rev = "72ba5e6a1f52c0887e2674615e318ce21a39cc2a" }
[[tool.uv.index]]
name = "pypi"
url = "https://pypi.org/simple"
[[tool.uv.index]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
[tool.uv.extra-build-dependencies]
flash-attn = [
{ requirement = "torch", match-runtime = true },
]
[tool.uv.dependency-groups]
tinker = {requires-python = ">=3.11"}
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["agentlightning"]
include = ["agentlightning/**/*.yaml", "agentlightning/**/*.yml", "agentlightning/**/*.poml"]
[tool.hatch.build.targets.sdist]
exclude = [
"examples/**",
"tests/**",
"docs/**",
"scripts/**",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.black]
line-length = 120
target-version = ['py312']
include = '\.pyi?$'
extend-exclude = '''
/(
_version\.py
)
'''
[tool.isort]
profile = "black"
line_length = 120
known_first_party = ["agentlightning"]
extend_skip_glob = [
"data/**",
"_version.py",
]