Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

ImportError: cannot import name 'metanet_pb2' from partially initialized module 'caffe2.proto' #1719

Open
bhomass opened this issue Jul 9, 2022 · 1 comment

Comments

@bhomass
Copy link

bhomass commented Jul 9, 2022

Steps to reproduce

  1. git clone https://github.com/facebookresearch/Clinical-Trial-Parser.git
  2. install pytext by source https://pytext.readthedocs.io/en/master/installation.html#install-from-source
  3. go build ./...
  4. go test ./...
  5. pytext train < src/resources/config/ner.json

Observed Results

from caffe2.proto import caffe2_pb2
File "/data/anaconda3/envs/pytext/lib/python3.8/site-packages/caffe2/proto/init.py", line 15, in
from caffe2.proto import caffe2_pb2, metanet_pb2, torch_pb2
ImportError: cannot import name 'metanet_pb2' from partially initialized module 'caffe2.proto'

  • What happened? This could be a description, log output, etc.

Expected Results

I expect pytext to carry out the trainig

  • What did you expect to happen?
    completed training

Relevant Code

in https://github.com/facebookresearch/Clinical-Trial-Parser.git

// TODO(you): code here to reproduce the problem
I have been trying to get this lib to work for three days. I have tried python 3.5, 3.6, 3.7, and 3.10.
I have tried installing pytext using conda, pip, and build from source.

googling ends up in dead trails where people continue to see the same problem, but previously raised tickets are closed.

Please give indication how to get past this step?
@bhomass
Copy link
Author

bhomass commented Jul 10, 2022

I get the same error following the README in this repo by running

pytext export < demo/configs/docnn.json

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant