Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install on pip on systems without cuda #27

Open
bratao opened this issue Sep 16, 2020 · 7 comments
Open

Install on pip on systems without cuda #27

bratao opened this issue Sep 16, 2020 · 7 comments

Comments

@bratao
Copy link

bratao commented Sep 16, 2020

Hello,
In our CI we install the haste_pytorch but it is failing because we do not have cuda. On #2 you said that is possible to run on CPU only scenarios.

Would be possible to install haste_pytorch without requiring cuda?

@sharvil
Copy link
Contributor

sharvil commented Sep 16, 2020

Is the issue that you have machines with no CUDA-capable GPUs in them, or that you're unable to install the CUDA toolkit on those machines? I imagine it's the former since I wouldn't expect CI/CD systems to have GPUs.

@bratao
Copy link
Author

bratao commented Sep 16, 2020

@sharvil I have machines with no CUDA and no GPUs. I would like to install haste on them to predict using the CPU version implemented on 1f47a50

@sharvil
Copy link
Contributor

sharvil commented Sep 16, 2020

Right, so this seems like a build issue – haste build against CUDA which isn't installed on your target system. Would you be able to install the CUDA toolkit on those machines (https://stackoverflow.com/questions/20186848/can-i-compile-a-cuda-program-without-having-a-cuda-device)?

Alternatively, (I haven't tried this recently) you could export your model to TorchScript after it's trained and use that to run predictions on CPU on a different machine. That way you wouldn't even need haste installed on the target machine.

@Zadagu
Copy link

Zadagu commented Jan 9, 2021

I have the same issue. I'm developing on a small notebook and don't want to waste 2GB on a cuda installation.
It would be great if there would be something like pip install haste_tf[no-cuda] to dissable the cuda part, when it's not needed.

@sharvil
Copy link
Contributor

sharvil commented Jan 10, 2021

@Zadagu that sounds like a reasonable request. Out of curiosity, what is your primary reason for using Haste even without CUDA? Is it because regularization is built-in to many of the RNNs, so that you can easily migrate to a fast CUDA implementation once you're done experimenting in your notebook, or some other reason altogether?

@Zadagu
Copy link

Zadagu commented Jan 10, 2021

I use haste in combination with pytorch because it provides me the posibility to output the whole sequence of hidden states and cell contents.
The notebook is just the debugging platform. The real training will run on a data center using cuda.

@bratao
Copy link
Author

bratao commented Jan 11, 2021

Here is a fork that will install in Pypi without cuda
https://pypi.org/project/haste-pytorch-cpu/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants