sentencepiece: `sentencepiece==0.1.92` seems breaking something
with newly released sentencepiece==0.1.92
Python 3.6.9 (default, Nov 7 2019, 10:44:02)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import transformers, torch
>>> transformers.__version__
'2.9.1'
>>> torch.__version__
'1.4.0'
>>> torch.rand(3)
Segmentation fault (core dumped)
However, downgrade to sentencepiece==0.1.91
solves this issue
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 11
- Comments: 16 (1 by maintainers)
I can confirm, I have been having the exact same issue with version 0.1.92 which I don’t with 0.1.91. In my case, I’m having a segmentation fault on
pytorch
(1.3.1) andtransformers
(2.11.0)torch.nn.Module
init. Usingfaulthandler
I managed to get the details that it creates a seg fault at the following:That line happens to be:
I suspect something in the sentencepiece new version prevent torch binaries from normally register its resources.
Downgrading to version 0.1.91 fixes the issue for me as well.
Not sure how related this is but it might help. installing & importing transformers would cause a segmentation fault. I fixed it by
pip install sentencepiece==0.1.91
.Here’s my stack trace
Is it the same as https://github.com/pytorch/pytorch/issues/8358? This looks like another case of incompatibility with PyTorch which releases non standard
manylinux1
packages, not SentencePiece fault.Sometimes the import order helps working around the issue:
Downgraded.