目录
问题:
运行mmseg工程时(openmmlab的工程都可适用,mmdet\mmcls),出现以下bug报错:
Traceback (most recent call last):
File "tools/train.py", line 131, in
main()
File "tools/train.py", line 127, in main
logger=logger)......
OSError: [Errno 95] Operation not supported: 'epoch_1.pth' -> '/xxx/latest.pth'
解决方法1:
在config文件的checkpoint_config处增加create_symlink参数。
checkpoint_config = dict(...,creat_symlink=False)
即可解决。
解决方法2:
可能在第一步解决之后会出现:TypeError: save_checkpoint() got an unexpected keyword argument 'creat_symlink'报错。解决方法如下:
找到open-mmlab的安装位置,例如:/root/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/utils/path.py
将path.py里36行的
os.symlink(src, dst, **kwargs)
这一句注释掉,即可解决报错问题。