From 4e211ba9b27361efac64a600eb26c1aef1271fe7 Mon Sep 17 00:00:00 2001 From: Haibin Lin Date: Tue, 3 Dec 2024 16:10:48 -0800 Subject: [PATCH 1/2] [distro] refactor: cleanup dependencies in setup script --- requirements.txt | 20 +++++++++----------- setup.py | 19 ++++--------------- 2 files changed, 13 insertions(+), 26 deletions(-) diff --git a/requirements.txt b/requirements.txt index 823cfda1..5e08fb1a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,10 @@ -transformers -hydra-core -tensordict < 0.3.1 -numpy -pytest -deepspeed -pybind11 +# vllm==0.5.4 # vllm is installed in image building to avoid ray conflicts +# TODO: add version info to requirements +accelerate codetiming -yapf -wandb -git+https://github.com/NVIDIA/TransformerEngine.git@stable -# vllm==0.5.4 # vllm is installed in image building to avoid ray conflicts \ No newline at end of file +dill +hydra-core +numpy +pybind11 +tensordict +transformers diff --git a/setup.py b/setup.py index 8289d3c6..5ffc0d50 100644 --- a/setup.py +++ b/setup.py @@ -20,27 +20,16 @@ with open(os.path.join(version_folder, 'verl/version/version')) as f: __version__ = f.read().strip() -# TODO: add version info to requirements -install_requires = [ - 'torch==2.4.0', - 'tensordict', - 'transformers', - 'codetiming', - 'pybind11', - 'hydra-core', - 'numpy', - 'pytest', - 'yapf', - "dill", - "accelerate" -] +with open('requirements.txt') as f: + required = f.read().splitlines() + install_requires = [item.strip() for item in required if item.strip()[0] != '#'] install_optional = [ 'vllm==0.5.4', + 'torch==2.4.0', ] extras_require = { - 'demo': ['hydra-core', 'transformers', ''], 'single-controller': ['ray', 'kubernetes'], 'single-controller-ray': ['ray'], } From 91cce97e7d9f9e31e9f5025c71599d1db2e11490 Mon Sep 17 00:00:00 2001 From: HL Date: Tue, 3 Dec 2024 20:25:35 -0800 Subject: [PATCH 2/2] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 5e08fb1a..93920c80 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,7 @@ # TODO: add version info to requirements accelerate codetiming +datasets dill hydra-core numpy