AttributeError: module 'portalocker' has no attribute 'Lock'
See original GitHub issueThanks for sharing your great work. I am sorry that I have a bug when I use
python ./tools/train_net.py --num-gpus 1 --config-file ./configs/yolof_R_50_C5_1x.yaml
Bug log below as :
[03/26 07:38:03 d2.data.build]: Using training sampler TrainingSampler [03/26 07:38:03 d2.data.common]: Serializing 117266 elements to byte tensors and concatenating them all … [03/26 07:38:10 d2.data.common]: Serialized dataset takes 451.21 MiB [03/26 07:38:15 fvcore.common.checkpoint]: Loading checkpoint from detectron2://ImageNetPretrained/MSRA/R-50.pkl Traceback (most recent call last): File “./tools/train_net.py”, line 234, in <module> args=(args,), File “/home/cw/miniconda3/envs/yolof/lib/python3.6/site-packages/detectron2/engine/launch.py”, line 62, in launch main_func(*args) File “./tools/train_net.py”, line 215, in main trainer.resume_or_load(resume=args.resume) File “/home/cw/miniconda3/envs/yolof/lib/python3.6/site-packages/detectron2/engine/defaults.py”, line 353, in resume_or_load checkpoint = self.checkpointer.resume_or_load(self.cfg.MODEL.WEIGHTS, resume=resume) File “/home/cw/miniconda3/envs/yolof/lib/python3.6/site-packages/fvcore/common/checkpoint.py”, line 215, in resume_or_load return self.load(path, checkpointables=[]) File “/home/cw/miniconda3/envs/yolof/lib/python3.6/site-packages/fvcore/common/checkpoint.py”, line 140, in load path = self.path_manager.get_local_path(path) File “/home/cw/miniconda3/envs/yolof/lib/python3.6/site-packages/iopath/common/file_io.py”, line 1100, in get_local_path path, force=force, **kwargs File “/home/cw/miniconda3/envs/yolof/lib/python3.6/site-packages/detectron2/utils/file_io.py”, line 29, in _get_local_path return PathManager.get_local_path(self.S3_DETECTRON2_PREFIX + name, **kwargs) File “/home/cw/miniconda3/envs/yolof/lib/python3.6/site-packages/iopath/common/file_io.py”, line 1100, in get_local_path path, force=force, **kwargs File “/home/cw/miniconda3/envs/yolof/lib/python3.6/site-packages/iopath/common/file_io.py”, line 755, in _get_local_path with file_lock(cached): File “/home/cw/miniconda3/envs/yolof/lib/python3.6/site-packages/iopath/common/file_io.py”, line 82, in file_lock return portalocker.Lock(path + “.lock”, timeout=3600) # type: ignore AttributeError: module ‘portalocker’ has no attribute ‘Lock’
I woule be grateful if you could give me some advice. Thanks.
Issue Analytics
- State:
- Created 2 years ago
- Comments:31 (10 by maintainers)
Top GitHub Comments
first
pip uninstall portalocker
andconda install portalocker
then bug will be fixed.另外有一个小地方,我觉得您可以考虑修改下 。 就是您建议安装的
mish-cuda
,好像不能够直接 build After git clone,you should movemish-cuda/external/CUDAApplyUtils.cuh
tocsrc/
beforepython setup.py build install
link-issue