Skip to content

Commit 6c50026

Browse files
authored
[dependencies] Move direct dependencies to tool.uv.sources to unblock pypi release (#165)
^
1 parent d07f293 commit 6c50026

File tree

2 files changed

+41
-15
lines changed

2 files changed

+41
-15
lines changed

skyrl-train/pyproject.toml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ classifiers = [
1919
]
2020

2121
dependencies = [
22-
"flash-attn@https://github.com/Dao-AILab/flash-attention/releases/download/v2.8.0.post2/flash_attn-2.8.0.post2+cu12torch2.7cxx11abiFALSE-cp312-cp312-linux_x86_64.whl",
2322
"loguru",
2423
"tqdm",
2524
"tensorboard",
@@ -38,6 +37,7 @@ dependencies = [
3837
"tensordict",
3938
"jaxtyping",
4039
"skyrl-gym",
40+
"flash-attn",
4141
]
4242

4343
[tool.uv]
@@ -52,7 +52,15 @@ conflicts = [
5252
skyrl-gym = { path = "./skyrl-gym" , editable = true }
5353
torch = { index = "pytorch-cu128" }
5454
torchvision = { index = "pytorch-cu128" }
55-
55+
flash-attn = { url = "https://github.com/Dao-AILab/flash-attention/releases/download/v2.8.0.post2/flash_attn-2.8.0.post2+cu12torch2.7cxx11abiFALSE-cp312-cp312-linux_x86_64.whl" }
56+
# NOTE (sumanthrh): We explictly use a flashinfer wheel from their index.
57+
# The wheels on PyPI don't come with pre-compiled kernels and the package will JIT compile them at runtime which is slow.
58+
# additionally, different inference engines may pin different compatible flashinfer versions, so we provide the option to pin different versions for vllm/sglang
59+
flashinfer-python = [
60+
{ url = "https://download.pytorch.org/whl/cu128/flashinfer/flashinfer_python-0.2.6.post1%2Bcu128torch2.7-cp39-abi3-linux_x86_64.whl", marker = "extra =='vllm'" },
61+
{ url = "https://download.pytorch.org/whl/cu128/flashinfer/flashinfer_python-0.2.6.post1%2Bcu128torch2.7-cp39-abi3-linux_x86_64.whl", marker = "extra == 'sglang' and extra != 'vllm'" }
62+
]
63+
5664
[project.optional-dependencies]
5765
deepspeed = [
5866
"deepspeed==0.16.5"
@@ -74,17 +82,13 @@ docs = [
7482
]
7583
vllm = [
7684
"vllm==0.9.2",
77-
# NOTE (sumanthrh): We explictly use a flashinfer wheel from their index.
78-
# The wheels on PyPI don't come with pre-compiled kernels and the package will JIT compile them at runtime (terribly slow).
79-
"flashinfer-python@https://download.pytorch.org/whl/cu128/flashinfer/flashinfer_python-0.2.6.post1%2Bcu128torch2.7-cp39-abi3-linux_x86_64.whl",
8085
"torch==2.7.0",
86+
"flashinfer-python",
8187
"torchvision"
8288
]
8389
sglang = [
8490
"sglang[srt,openai,torch_memory_saver]==0.4.8.post1", # 0.4.9.post1 causes non-colocate weight broadcast to hang
85-
# The version is pinned to 0.2.5 because sglang requires this
86-
# NOTE (sumanthrh): This can be made a common dependency, but then different inference engines can pin different compatible flashinfer versions and it might quickly break.
87-
"flashinfer-python@https://download.pytorch.org/whl/cu128/flashinfer/flashinfer_python-0.2.6.post1%2Bcu128torch2.7-cp39-abi3-linux_x86_64.whl",
91+
"flashinfer-python",
8892
"torch==2.7.1",
8993
"torchvision",
9094
]

skyrl-train/uv.lock

Lines changed: 29 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)