Demo script fails with ImportError: cannot import name 'metanet_pb2' from 'caffe2.proto'
See original GitHub issueInstructions To Reproduce the 🐛 Bug:
What exact command you run: python demo.py --config-file faster_rcnn_fbnetv3a_C4.yaml --input input1.jpg --output output1.jpg
Full logs or other relevant observations:
(d2go) mat@ada:~/repos/d2go/demo$ python demo.py --config-file faster_rcnn_fbnetv3a_C4.yaml --input input1.jpg --output output1.jpg
Traceback (most recent call last):
File "demo.py", line 11, in <module>
from d2go.model_zoo import model_zoo
File "/home/mat/anaconda3/envs/d2go/lib/python3.7/site-packages/d2go/model_zoo/model_zoo.py", line 7, in <module>
from d2go.runner import create_runner
File "/home/mat/anaconda3/envs/d2go/lib/python3.7/site-packages/d2go/runner/__init__.py", line 10, in <module>
from .default_runner import BaseRunner, Detectron2GoRunner, GeneralizedRCNNRunner
File "/home/mat/anaconda3/envs/d2go/lib/python3.7/site-packages/d2go/runner/default_runner.py", line 28, in <module>
from d2go.export.d2_meta_arch import patch_d2_meta_arch
File "/home/mat/anaconda3/envs/d2go/lib/python3.7/site-packages/d2go/export/__init__.py", line 5, in <module>
from . import torchscript # noqa
File "/home/mat/anaconda3/envs/d2go/lib/python3.7/site-packages/d2go/export/torchscript.py", line 13, in <module>
from detectron2.export.flatten import TracingAdapter, flatten_to_tuple
File "/home/mat/anaconda3/envs/d2go/lib/python3.7/site-packages/detectron2/export/__init__.py", line 3, in <module>
from .api import *
File "/home/mat/anaconda3/envs/d2go/lib/python3.7/site-packages/detectron2/export/api.py", line 6, in <module>
from caffe2.proto import caffe2_pb2
File "/home/mat/anaconda3/envs/d2go/lib/python3.7/site-packages/caffe2/proto/__init__.py", line 11, in <module>
from caffe2.proto import caffe2_pb2, metanet_pb2, torch_pb2
ImportError: cannot import name 'metanet_pb2' from 'caffe2.proto' (/home/mat/anaconda3/envs/d2go/lib/python3.7/site-packages/caffe2/proto/__init__.py)
pytorch 1.11.0.dev20211109 py3.7_cuda10.2_cudnn7.6.5_0 pytorch-nightly
pytorch-lightning 1.5.0 pypi_0 pypi
Was unable to track down what the issue was. Tried installing stable PyTorch build and got segfault
Issue Analytics
- State:
- Created 2 years ago
- Comments:15
Top Results From Across the Web
importerror: cannot import name 'metanet_pb2' from 'caffe2. ...
import caffe2.python.core regressed in recent daily builds and shows: ImportError: cannot import name 'metanet_pb2' from partially initialized module 'caffe2.
Read more >Why do I see "cannot import name descriptor_pb2" error ...
I believe you have to generate descriptor_pb2.py with protoc yourself: protoc descriptor.proto --python_out=gen/. gen/ is a folder with generated python ...
Read more >from caffe2.proto import caffe2_pb2 ImportError: cannot ...
出现from caffe2.proto import caffe2_pb2 ImportError: cannot import name caffe2_pb2的错误。 但是我. import caffe2. 没有出现问题. 解决方案:在home ...
Read more >Cannot import script — oracle-tech
Cannot import script ... Filename: Demobld.sql. Error that comes up when importing: Your export file is not supported.
Read more >rospy: cannot import name for services, request and ...
However when I try to unittest my script, it gives an error when loading the service, the request or the response. Specifically: turning_robot....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Also facing this issue. Please help
I believe that the same possible with conda, but it was pip installation
pip3 install --pre torch==1.11.0.dev20211001+cu113 torchvision torchaudio -f https://download.pytorch.org/whl/nightly/cu113/torch_nightly.html