When I run a simple snippet like:
learn = cnn_learner(data, models.resnet34, metrics=error_rate)
I get the following error:
PermissionError: [Errno 13] Permission denied: '/home/.cache'
Any idea about what can be done? I CANNOT gain write access to ./home/.cache
.
The whole error log is here:
---------------------------------------------------------------------------
PermissionError Traceback (most recent call last)
/grid/1/yarn/local/filecache/426/launch_ipykernel.py in <module>
----> 1 learn = cnn_learner(data, models.resnet34, metrics=error_rate)
/grid/2/yarn/local/usercache/abhay.g/appcache/application_1594967722104_1018/container_e2618_1594967722104_1018_01_000001/Abhay_D42_Flask.Linux_debian_9_3.py36.fast_ai2.tar.gz/lib/python3.6/site-packages/fastai/vision/learner.py in cnn_learner(data, base_arch, cut, pretrained, lin_ftrs, ps, custom_head, split_on, bn_final, init, concat_pool, **kwargs)
96 meta = cnn_config(base_arch)
97 model = create_cnn_model(base_arch, data.c, cut, pretrained, lin_ftrs, ps=ps, custom_head=custom_head,
---> 98 bn_final=bn_final, concat_pool=concat_pool)
99 learn = Learner(data, model, **kwargs)
100 learn.split(split_on or meta['split'])
/grid/2/yarn/local/usercache/abhay.g/appcache/application_1594967722104_1018/container_e2618_1594967722104_1018_01_000001/Abhay_D42_Flask.Linux_debian_9_3.py36.fast_ai2.tar.gz/lib/python3.6/site-packages/fastai/vision/learner.py in create_cnn_model(base_arch, nc, cut, pretrained, lin_ftrs, ps, custom_head, bn_final, concat_pool)
82 bn_final:bool=False, concat_pool:bool=True):
83 "Create custom convnet architecture"
---> 84 body = create_body(base_arch, pretrained, cut)
85 if custom_head is None:
86 nf = num_features_model(nn.Sequential(*body.children())) * (2 if concat_pool else 1)
/grid/2/yarn/local/usercache/abhay.g/appcache/application_1594967722104_1018/container_e2618_1594967722104_1018_01_000001/Abhay_D42_Flask.Linux_debian_9_3.py36.fast_ai2.tar.gz/lib/python3.6/site-packages/fastai/vision/learner.py in create_body(arch, pretrained, cut)
54 def create_body(arch:Callable, pretrained:bool=True, cut:Optional[Union[int, Callable]]=None):
55 "Cut off the body of a typically pretrained `model` at `cut` (int) or cut the model as specified by `cut(model)` (function)."
---> 56 model = arch(pretrained)
57 cut = ifnone(cut, cnn_config(arch)['cut'])
58 if cut is None:
/grid/2/yarn/local/usercache/abhay.g/appcache/application_1594967722104_1018/container_e2618_1594967722104_1018_01_000001/Abhay_D42_Flask.Linux_debian_9_3.py36.fast_ai2.tar.gz/lib/python3.6/site-packages/torchvision/models/resnet.py in resnet34(pretrained, progress, **kwargs)
247 """
248 return _resnet('resnet34', BasicBlock, [3, 4, 6, 3], pretrained, progress,
--> 249 **kwargs)
250
251
/grid/2/yarn/local/usercache/abhay.g/appcache/application_1594967722104_1018/container_e2618_1594967722104_1018_01_000001/Abhay_D42_Flask.Linux_debian_9_3.py36.fast_ai2.tar.gz/lib/python3.6/site-packages/torchvision/models/resnet.py in _resnet(arch, block, layers, pretrained, progress, **kwargs)
221 if pretrained:
222 state_dict = load_state_dict_from_url(model_urls[arch],
--> 223 progress=progress)
224 model.load_state_dict(state_dict)
225 return model
/grid/2/yarn/local/usercache/abhay.g/appcache/application_1594967722104_1018/container_e2618_1594967722104_1018_01_000001/Abhay_D42_Flask.Linux_debian_9_3.py36.fast_ai2.tar.gz/lib/python3.6/site-packages/torch/hub.py in load_state_dict_from_url(url, model_dir, map_location, progress, check_hash)
475
476 try:
--> 477 os.makedirs(model_dir)
478 except OSError as e:
479 if e.errno == errno.EEXIST:
/grid/2/yarn/local/usercache/abhay.g/appcache/application_1594967722104_1018/container_e2618_1594967722104_1018_01_000001/Abhay_D42_Flask.Linux_debian_9_3.py36.fast_ai2.tar.gz/lib/python3.6/os.py in makedirs(name, mode, exist_ok)
208 if head and tail and not path.exists(head):
209 try:
--> 210 makedirs(head, mode, exist_ok)
211 except FileExistsError:
212 # Defeats race condition when another thread created the path
/grid/2/yarn/local/usercache/abhay.g/appcache/application_1594967722104_1018/container_e2618_1594967722104_1018_01_000001/Abhay_D42_Flask.Linux_debian_9_3.py36.fast_ai2.tar.gz/lib/python3.6/os.py in makedirs(name, mode, exist_ok)
208 if head and tail and not path.exists(head):
209 try:
--> 210 makedirs(head, mode, exist_ok)
211 except FileExistsError:
212 # Defeats race condition when another thread created the path
/grid/2/yarn/local/usercache/abhay.g/appcache/application_1594967722104_1018/container_e2618_1594967722104_1018_01_000001/Abhay_D42_Flask.Linux_debian_9_3.py36.fast_ai2.tar.gz/lib/python3.6/os.py in makedirs(name, mode, exist_ok)
218 return
219 try:
--> 220 mkdir(name, mode)
221 except OSError:
222 # Cannot rely on checking for EEXIST, since the operating system
PermissionError: [Errno 13] Permission denied: '/home/.cache'