Failed to run a simple huggingface code

Failed to run a simple huggingface code as :

from transformers import pipeline

import torch
import torch.nn.functional as F

classifier = pipeline("sentiment-analysis")
res = classifier("We are very happy to shwo you how to use HuggingFace's Transformers library.")

print(res)
~/.local/lib/python3.8/site-packages/detectron2-0.4.1-py3.8-linux-x86_64.egg/detectron2/_C.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNK2at6Tensor7reshapeEN3c108ArrayRefIlEE```


Did anybody meet similar issues?

Cheers
Pei

I had the same issue. I fixed it by reinstalling detectron2 from source:

pip uninstall detectron2
pip install 'git+https://github.com/facebookresearch/detectron2.git'