iusztinpaul / hands-on-llms

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

Update pyproject.toml #62

Open faceyacc opened 11 months ago

faceyacc commented 11 months ago

Ran into a Unable to find installation candidates for torch (2.1.2+cpu) error on Macbook (Intel) when not specifying platform key (i.e. torch = { platform = "linux", version = "2.0.1+cpu", source = "torch-cpu" })

iusztinpaul commented 11 months ago

Thanks for contributing to the course @faceyacc

Before merging it, I have a few questions.

What happens if you want to install it for a different platform? e.g. darwin?

faceyacc commented 11 months ago

Installing for different platforms requires you to use a list to specify the source for each dependency. I realize this solution may not be ideal, but has worked for me, furthermore I realize that this has been a know issue with Poetry, so I assume others may have ran into this issue with following along with course. The following works for me:

... torch = [ {platform = "win32", version = "2.0.1+cpu", source = "torch-cpu"}, {platform = "linux", version = "2.0.1+cpu", source = "torch-cpu"}, {platform = "darwin", version = "2.0.1", source = "pypi"}, ] ...

Link to issues #8106 and #4231.

iusztinpaul commented 10 months ago

Thank you for highlighting this.

Have you tested with these modifications?

torch = [
{platform = "win32", version = "2.0.1+cpu", source = "torch-cpu"},
{platform = "linux", version = "2.0.1+cpu", source = "torch-cpu"},
{platform = "darwin", version = "2.0.1", source = "pypi"},
]

I know others who had issues installing Torch with Poetry on MacOS. Maybe this will fix it.