Skip to content

Commit 2fb227c

Browse files
committed
build: update requirements.txt and setup.py
1 parent 544f22e commit 2fb227c

2 files changed

Lines changed: 71 additions & 25 deletions

File tree

requirements.txt

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,21 @@ datasets
44
dill
55
flash-attn
66
hydra-core
7+
liger-kernel
78
numpy
89
pandas
10+
peft
11+
pyarrow>=19.0.0
912
pybind11
10-
ray
11-
tensordict<0.6
12-
transformers<4.48
13-
vllm<=0.6.3
13+
pylatexenc
14+
pre-commit
15+
ray[default]
16+
tensordict<=0.6.2
17+
torchdata
18+
transformers==4.51.1
19+
# vllm==0.8.4
1420
wandb
15-
IPython
16-
matplotlib
17-
omegaconf
21+
packaging>=20.0
22+
uvicorn
23+
fastapi
24+
qwen-vl-utils[decord]

setup.py

Lines changed: 57 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,81 @@
1313
# limitations under the License.
1414

1515
# setup.py is the fallback installation script when pyproject.toml does not work
16-
from setuptools import setup, find_packages
1716
import os
17+
from pathlib import Path
18+
19+
from setuptools import find_packages, setup
1820

1921
version_folder = os.path.dirname(os.path.join(os.path.abspath(__file__)))
2022

21-
with open(os.path.join(version_folder, 'verl/version/version')) as f:
23+
with open(os.path.join(version_folder, "verl/version/version")) as f:
2224
__version__ = f.read().strip()
2325

26+
install_requires = [
27+
"accelerate",
28+
"codetiming",
29+
"datasets",
30+
"dill",
31+
"hydra-core",
32+
"numpy",
33+
"pandas",
34+
"peft",
35+
"pyarrow>=19.0.0",
36+
"pybind11",
37+
"pylatexenc",
38+
"ray[default]>=2.41.0",
39+
"torchdata",
40+
"tensordict<=0.6.2",
41+
"transformers<=4.51.1",
42+
"wandb",
43+
"packaging>=20.0",
44+
"qwen-vl-utils[decord]",
45+
]
2446

25-
with open('requirements.txt') as f:
26-
required = f.read().splitlines()
27-
install_requires = [item.strip() for item in required if item.strip()[0] != '#']
47+
TEST_REQUIRES = ["pytest", "pre-commit", "py-spy"]
48+
PRIME_REQUIRES = ["pyext"]
49+
GEO_REQUIRES = ["mathruler"]
50+
GPU_REQUIRES = ["liger-kernel", "flash-attn"]
51+
MATH_REQUIRES = ["math-verify"] # Add math-verify as an optional dependency
52+
VLLM_REQUIRES = ["tensordict<=0.6.2", "vllm<=0.8.5"]
53+
SGLANG_REQUIRES = [
54+
"tensordict<=0.6.2",
55+
"sglang[srt,openai]==0.4.6.post5",
56+
"torch-memory-saver>=0.0.5",
57+
"torch==2.6.0",
58+
]
2859

2960
extras_require = {
30-
'test': ['pytest', 'yapf']
61+
"test": TEST_REQUIRES,
62+
"prime": PRIME_REQUIRES,
63+
"geo": GEO_REQUIRES,
64+
"gpu": GPU_REQUIRES,
65+
"math": MATH_REQUIRES,
66+
"vllm": VLLM_REQUIRES,
67+
"sglang": SGLANG_REQUIRES,
3168
}
3269

33-
from pathlib import Path
70+
3471
this_directory = Path(__file__).parent
3572
long_description = (this_directory / "README.md").read_text()
3673

3774
setup(
38-
name='verl',
75+
name="verl",
3976
version=__version__,
40-
package_dir={'': '.'},
41-
packages=find_packages(where='.'),
42-
url='https://github.com/volcengine/verl',
43-
license='Apache 2.0',
44-
author='Bytedance - Seed - MLSys',
45-
author_email='zhangchi.usc1992@bytedance.com, gmsheng@connect.hku.hk',
46-
description='veRL: Volcano Engine Reinforcement Learning for LLM',
77+
package_dir={"": "."},
78+
packages=find_packages(where="."),
79+
url="https://github.com/volcengine/verl",
80+
license="Apache 2.0",
81+
author="Bytedance - Seed - MLSys",
82+
author_email="zhangchi.usc1992@bytedance.com, gmsheng@connect.hku.hk",
83+
description="verl: Volcano Engine Reinforcement Learning for LLM",
4784
install_requires=install_requires,
4885
extras_require=extras_require,
49-
package_data={'': ['version/*'],
50-
'verl': ['trainer/config/*.yaml'],},
86+
package_data={
87+
"": ["version/*"],
88+
"verl": ["trainer/config/*.yaml"],
89+
},
5190
include_package_data=True,
5291
long_description=long_description,
53-
long_description_content_type='text/markdown'
92+
long_description_content_type="text/markdown",
5493
)

0 commit comments

Comments
 (0)