[QUESTION] Is there a recommended way to use darts with cpu version of pytorch ?
Hello,
I have this use case where I need to use darts with PyTorch, but I do not have access/need for a GPU.
I was able to install darts with PyTorch CPU version with
pip install u8darts
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install pytorch_lightning
Is there a better or more official way to install Darts with CPU-only PyTorch? For example, could there be an option like pip install u8darts[torch-cpu] similar to existing extras ?
If so, would it be appropriate to add these instructions to the official installation docs here?
https://github.com/unit8co/darts/blob/master/INSTALL.md
Thanks!
According to the various resources I could find online, what you described seems to be a nice way to install Darts with the CPU-only version of PyTorch. I would maybe just install PyTorch before installing Darts, so that it's not installed twice.
At the moment, there is no official way/flavor of Darts with PyTorch for CPU but we might consider it.
@madtoinou u8darts comes without torch :)
You could simplify it a bit with:
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install u8darts[torch]
This would install all our torch dependencies though:
pytorch-lightning>=1.5.0
tensorboardX>=2.1
torch>=1.8.0
Since torch would already installed in the CPU version, it should not install the GPU version.
If you don't need tensorboardX then you can use what you suggested initially :)
Hello @dennisbader @madtoinou,
Thanks for the tips. I've taken the time to try, and I can confirm it works as intended. Would you find it appropriate if I sent a PR to add this use case to the docs ?
https://github.com/unit8co/darts/blob/bd53fe022f3dcb48799fe3f0cdf3a6ba004a820e/INSTALL.md?plain=1#L1-L18
After these lines I would add an item to the list in the form of
- Install core + neural networks CPU only (using PyTorch CPU wheel): first install torch
pip install torch --index-url https://download.pytorch.org/whl/cputhen u8dartspip install "u8darts[torch]"