allenai / open-instruct

Apache License 2.0
1.21k stars 166 forks source link

pip install -r requirements.txt--encounter conflict version issue for torch and pydantic #172

Closed dumeixiang closed 3 months ago

dumeixiang commented 3 months ago

conflict in torch and pydantic version:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. vllm-flash-attn 2.5.8.post2 requires torch==2.3.0, but you have torch 2.0.1 which is incompatible. outlines 0.0.34 requires pydantic>=2.0, but you have pydantic 1.10.15 which is incompatible. outlines 0.0.34 requires torch>=2.1.0, but you have torch 2.0.1 which is incompatible.

my_username:~/open-instruct$ pip install --upgrade torch==2.3.0 pydantic>=2.0

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. xformers 0.0.22 requires torch==2.0.1, but you have torch 2.3.0 which is incompatible. vllm 0.2.1.post1 requires pydantic<2, but you have pydantic 2.7.3 which is incompatible. vllm 0.2.1.post1 requires torch==2.0.1, but you have torch 2.3.0 which is incompatible. ai2-olmo 0.3.0 requires torch<2.3,>=2.0, but you have torch 2.3.0 which is incompatible.

natolambert commented 3 months ago

Hey @dumeixiang -- the requirements are all being updated shortly via #151. Though, I think this will pin vllm at a version lower than you're trying to install. Let me know if the PR we're working on helps.

dumeixiang commented 3 months ago

Hey @dumeixiang -- the requirements are all being updated shortly via #151. Though, I think this will pin vllm at a version lower than you're trying to install. Let me know if the PR we're working on helps.

hi natolambert, --after replace the requirements.txt to #151 where torch version is relaxed and run the requirement, i am getting error as below::: _JOB_POOLS:STRING=compile=72']' returned non-zero exit status 1. [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for vllm Failed to build vllm ERROR: Could not build wheels for vllm, which is required to install pyproject.toml-based projects

After few rounds of trying, when I pip install vllm==0.4.0 and adjust vllm-flash-attn to pip install vllm-flash-attn==2.5.6, torch settled at torch 2.1.2, the environment stopped giving errors.

I will start to download dataset and run some script to test the environment, will keep the team posted, thanks!

natolambert commented 3 months ago

@dumeixiang which version? This makes sense. We could maybe support documentation for different platforms too. We guide our builds for Cuda 11.8 linux / nvidia machines

dumeixiang commented 3 months ago

@dumeixiang which version? This makes sense. We could maybe support documentation for different platforms too. We guide our builds for Cuda 11.8 linux / nvidia machines

by which version you mean cuda? then cuda 12.0 linux

hamishivi commented 3 months ago

Hi, as part of #151 I updated all versions and fixed this conflicting issue. The primary issue was that vLLM 0.4.2 and up requires pydantic>=2.0.0... but deepspeed (any version) requires pydantic < 2.0.0. However, OLMo was not integrated into vLLM until 0.4.2, which is annoying. For now, if you don't care about OLMo, then the default requirements.txt should work fine. If you want to use a newer version of vLLM, you'll have to remove deepspeed from the dependencies (this is done in requirements-olmo.txt). This is okay if you just want inference, but if you want to run model training in the same environment you'll need deepspeed (and so have to use an older vllm).

Please re-open or open a new issue if you encounter problems with the updated requirements! Thanks!