iusztinpaul / hands-on-llms

🦖 𝗟𝗲𝗮𝗿𝗻 about 𝗟𝗟𝗠𝘀, 𝗟𝗟𝗠𝗢𝗽𝘀, and 𝘃𝗲𝗰𝘁𝗼𝗿 𝗗𝗕𝘀 for free by designing, training, and deploying a real-time financial advisor LLM system ~ 𝘴𝘰𝘶𝘳𝘤𝘦 𝘤𝘰𝘥𝘦 + 𝘷𝘪𝘥𝘦𝘰 & 𝘳𝘦𝘢𝘥𝘪𝘯𝘨 𝘮𝘢𝘵𝘦𝘳𝘪𝘢𝘭𝘴
MIT License
3k stars 462 forks source link

Unable to find installation candidates for torch (2.0.1+cpu) #58

Open maxwkut opened 10 months ago

maxwkut commented 10 months ago
Screenshot 2023-12-01 at 3 22 14 PM

Great course so far!

I'm having some trouble running make install in the streaming_pipeline folder. Any suggestions?

Main dependencies are all installed.

iusztinpaul commented 10 months ago

Thanks! Happy to hear that.

What OS are you using?

maxwkut commented 10 months ago

I'm using macOS Sonoma 14. Not sure if this is a mac specific problem though - in the video tutorial, it looked like @Paulescu ran the code on a mac as well and didn't have any issues.

iusztinpaul commented 10 months ago

Yeah. You are right.

The streaming pipeline (out of the 3 modules) should work on macos. I tested my code only on Ubuntu. @Paulescu, do you know about this issue? Have you encountered it?

Paulescu commented 9 months ago

@maxwkut Have you tried removing the pip install torch... from the makefile and running poetry add torch ?

iusztinpaul commented 9 months ago

@maxwkut Have you managed to make it work?

maxwkut commented 9 months ago

@Paulescu @iusztinpaul I took out the torch-cpu dependency from pyproject.toml and then added the regular torch package using poetry add torch. Not sure if torch is a valid substitute for torch-cpu, but that at least allowed me to proceed to the next step: make run_real_time. Here I am now getting an error that there is an incompatible architecture (have arm64, but binary was compiled for x86_64)

Screenshot 2023-12-18 at 12 09 00 PM
iusztinpaul commented 9 months ago

Try to remove the torch completely from pyproject.toml by running poetry remove torch and then install it in your Poetry virtual environment using pip: poetry run pip install torch==2.0.1

Let me know if this works.

If that doesn't work, try to install it directly from the wheel, depending on your platform, something like this:

poetry add "https://download.pytorch.org/whl/cu118/torch-2.0.0%2Bcu118-cp310-cp310-linux_x86_64.whl" --platform linux
poetry add "https://download.pytorch.org/whl/cu118/torch-2.0.0%2Bcu118-cp310-cp310-linux_x86_64.whl" --platform darwin

Let me know if that works for you.

maxwkut commented 9 months ago

As you can see, I ran poetry run pip install torch == 2.0.1 after removing it.

Screenshot 2023-12-18 at 5 39 37 PM

It's saying that streaming-pipeline 0.1.0 requires torch<3.0.0,>=2.1.2?

I also tried running make run_real_time afterwards and the incompatible architecture error still persists

iusztinpaul commented 9 months ago

Have you tried the second option?