Closed chrisdrake112 closed 2 years ago
In the separate.py line 88 use this
pkg = torch.load(args.model_path, map_location='cpu')
hey I just tried that and got : Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from. Is there another step I should take? Thanks for your reply.
I couldn't run it on CPU either I had to use a machine with GPU Try Colab
Hi @adamfils and @chrisdrake112,
You can train your model on a cpu by setting the argument device=cpu
. It will probably be significantly slower but should work
hey @adamfils I have a model trained but we would like to run the separate script off of the cluster. Is there a way to do this on a cpu only machine?
Hi @adamfils and @chrisdrake112, You can train your model on a cpu by setting the argument
device=cpu
. It will probably be significantly slower but should work
Sorry but how can I then access the model (on a computer only with CPU)?
It seems that models/
will store the generated model. However, with device=cpu
, ddp=1
cannot be set.
$ python train.py ddp=1
[2021-12-17 13:58:05,639][__main__][INFO] - For logs, checkpoints and samples check /Users/yan.../github-projects/svoice/outputs/exp_
[2021-12-17 13:58:06,418][svoice.executor][ERROR] - DDP is only available on GPU. Make sure GPUs are properly configured with cuda.
@Yang-Xijie, Distributed Data Parallel generates a distributed training for GPU only. In case you are training on CPU (which will probably take forever to converge) you only option at the moment is a single CPU training.
I will close this issue as there is not new comments for a while. Feel free to reopen it if needed.
Hey Im looking to run the script separate on a CPU only device. I have set the map _location to cpu in site-packages/torch/serialization.py but still get the error: RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU. I would appreciate any advice thanks :) also the program is amazing.