Closed nsabir2011 closed 6 months ago
the environments that you describe in your torch requirements are non-exhaustive. pytorch-lightning depends on torch.
so you have left room for poetry to choose a more recent torch, satisfying the pytorch-lightning requirement, in the environments for which you have not specified an older torch.
please close
@dimbleby Thanks. Closing this as it seems I made a mistake. However, I don't entirely understand what you mean. Could you kindly elaborate? Perhaps a small example?
what version of torch should poetry install on windows, not x86-64? Why not the most recent?
@dimbleby Oh I see. Thanks for pointing it out. So it's better to do something like below, right?
...
torch = [
{ version = "1.12.1+cu113", source = "pytorch-cuda", platform = "linux", markers="platform_machine=='x86_64'" },
{ version = "1.12.1+cu113", source = "pytorch-cuda", platform = "win32", markers="platform_machine=='x86_64'" },
{ version = "1.12.1" },
]
torchvision = [
{ version = "0.13.1+cu113", source = "pytorch-cuda", platform = "linux", markers="platform_machine=='x86_64'" },
{ version = "0.13.1+cu113", source = "pytorch-cuda", platform = "win32", markers="platform_machine=='x86_64'" },
{ version = "0.13.1" },
]
...
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
poetry --version
-->-vvv
option) and have included the output below.Issue
I wanted to add every possible versions of torch for my needs in the
.toml
file. Basically I want to install cuda capable version when the platform architecture isx86_64
and install the non-cuda version when platform isaarch64
or when the OS ismacos
. Here's mypyproject.toml
file:I noticed that after I do
poetry lock
it adds dependencies required by the latest version of torch (currently2.2.1
) in the lock file: I am including only the related sections.This also means that the
poetry lock
command takes quite a long time as it downloads the latest torch packages. This is really annoying for someone who has a slow internet in a developing country. I also don't know if this will correctly install the required packages on a M-series Mac.Please guide me if I am doing anything wrong.