Open comaniac opened 2 years ago
seems to be some pybind bug..
Maybe some environment issues? I couldn't reproduce it in the CI docker image gcr.io/tpu-pytorch/xla_base:latest-d8db50a778a39fab0a58436307a3225a6ca06f67.
with pip install git@https://github.com/huggingface/transformers@06a6a4b
.
Maybe it's due to different build process? I didn't build PyTorch from source. Instead, I pip installed nightly PyTorch and manually installed corresponding libtorch. This is sufficient to build torch_xla and could save lots of time of building PyTorch from source. On the other hand, since nightly libtorch is built with g++ instead of clang++, I specified export CC=gcc CXX=g++
in my build script. However, I have no idea how this affect the error mentioned in this issue...
"import _XLAC" error usually happens when TensorFlow or JAX are installed in the same environment. @comaniac can you check?
🐛 Bug
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Error free import.
Environment
Additional context
It works if I explicitly import
torch_xla
before importingTrainingArguments
: