Set torch-backend for gpu drivers - #81
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
|
I am using a machine with Windows OS for development. I would personally prefer Docker image setup. Since dealing with these dependencies, especially for Windows users, is sometimes painful. |
Can you see if
I agree. Unfortunetely, I'm not sure that most people in academia will feel the same way. They would probably rather just |
@Jacob-Chmura It doesn't work on Windows. Seems like you need to specify @shenyangHuang's point also makes sense |
Understood. I will investigate this when I have some time tomorrow. It seems to me there should be an easy way to get cuda wheels on windows without needing to Also, based on our discussion in the meeting today, we will not be officially supporting windows for the time being. Therefore, I am happy to make small changes that make it more widely compatible to other platforms, but for now, we will target linux and keep those stable. Perhaps look into windows subsystem for linux: https://github.com/microsoft/WSL |

Purpose
The current
pyproject.tomlonly specifiestorch >= 2.5.1which defaults to cpu wheels. Nobody will care to run our library in CPU only mode, so the default should be to provide gpu support.Solution
The UV documentation suggests using the following (experimental) feature https://docs.astral.sh/uv/reference/settings/#pip_torch-backend, which:
I think this is reasonable
Alternatives
torch == 2.5.1+cu121so that all users have the same cuda-compatible version (needs care if their drivers are out of date, but completely reproducible with our code)uv pip install torch==2.5.1+cu121 --extra-index-url https://download.pytorch.org/whl/cu121. Most generic but requires an extra command on the behalf of the user.Note: Pypi only has cpu torch wheels, so when we publish there, we'll have to deal with this problem as well.
Relevant Prs
Fix #80