For the past week I have been jumping through flaming hoops to try and get vs code to use my GPU. I have a windows 11 OS with nvidia GE FORCE RTX 3070 16gb. I finally figured out how to use a Pytorch 2.0 container for my CUDA version. I run wsl through my windows terminal and then I open vs code and attach to the container. After creating the venv and installing everything I finally received “True” and can use my GPU.
However, when I run this part of the code:
learn = cnn_learner(dls, resnet34, metrics=accuracy)
print(next(learn.model.parameters()).device)
# Find the optimal learning rate and plot the learning rate finder
lr_min = learn.lr_find(show_plot=True)
print(f"The suggested learning rate is: {lr_min}")
I receive:
OSError Traceback (most recent call last)
Cell In[15], line 9
3 print(next(learn.model.parameters()).device)
6 # Find the optimal learning rate
7 # lr_min,lr_steep = learn.lr_find()
8 # Find the optimal learning rate and plot the learning rate finder
----> 9 lr_min = learn.lr_find(show_plot=True)
10 print(f"The suggested learning rate is: {lr_min}")
File ~/cci/models/v1/.venv/lib/python3.10/site-packages/fastai/callback/schedule.py:293, in lr_find(self, start_lr, end_lr, num_it, stop_div, show_plot, suggest_funcs)
...
File "/root/cci/models/v1/.venv/lib/python3.10/site-packages/PIL/Image.py", line 3236, in open
fp = builtins.open(filename, "rb")
OSError: [Errno 12] Cannot allocate memory: '/dir_in_docker/18092 REDACTED/IMG_2303.JPEG'
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...
I am sooo close I can feel it. Any advice is immensely appreciated.
I cant use cloud services because of how much data I have on my external hard drive