question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running small dataset on CPU

See original GitHub issue

hello, I am running into some issues when I attempt to run the train_unet script on a small dataset on my local environment (which does not have any GPU capabilities).

When I run the script with the --gpus argument set to 0, I get the following error message: File "/Users/abhinavsaksena/mri/fastMRI/env/lib/python3.7/site-packages/torch/utils/tensorboard/summary.py", line 156, in hparams raise ValueError('value should be one of int, float, str, bool, or torch.Tensor') ValueError: value should be one of int, float, str, bool, or torch.Tensor

If I try to change the --gpu arg to 1, I get the following message: File "/Users/abhinavsaksena/mri/fastMRI/env/lib/python3.7/site-packages/pytorch_lightning/trainer/distrib_parts.py", line 533, in sanitize_gpu_ids raise MisconfigurationException(message) pytorch_lightning.utilities.debugging.MisconfigurationException: You requested GPUs: [0] But your machine only has: []

How might I go about fixing these issues and run the code on my CPU? Here are some similar issues I found online for reference: https://github.com/PyTorchLightning/pytorch-lightning/pull/609 https://github.com/PyTorchLightning/pytorch-lightning/issues/899

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
asaksena98commented, Jun 3, 2020

I updated the pytorch-lightning version to 0.7.6 and that seemed to fix it.

0reactions
mmuckleycommented, Jun 3, 2020

Closing this as the problem is fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Breaking the curse of small data sets in Machine Learning
Large dataset helps us avoid overfitting and generalizes better as it captures the inherent data distribution more effectively.
Read more >
CPU vs. GPU : Computation Time Test on Tabular Well Log Data
For smaller dataset (figure below), for small batch sizes, we see that GPU is less than 2 times faster than CPU while for...
Read more >
Can I train a machine learning model on a personal computer ...
Yes and No. It is enough to run on small dataset, small library like scikit-learn, small neural network models since it will run...
Read more >
Running some Caffe examples on CPU and GPU
Also note that in order to make use of the power of GPU, our computer has to take some times to transfer data...
Read more >
How to load(pytorch) bigger dataset in to GPU and do mini ...
as we know, batch size affects training accuracy. (smaller batch size with higher acc.). but using smaller batch size also means longer ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found