ludwig icon indicating copy to clipboard operation
ludwig copied to clipboard

The torchtext version 0.14.1 in the Docker image is incompatible with pytorch 2.0.0

Open abaletinskikh opened this issue 1 year ago • 3 comments

the command to reproduce: podman run --entrypoint python ludwig-gpu:release-0.7 -c "import torchtext; print(torchtext.__version__);"

Output: Traceback (most recent call last): File "", line 1, in File "/opt/conda/lib/python3.10/site-packages/torchtext/init.py", line 6, in from torchtext import _extension # noqa: F401 File "/opt/conda/lib/python3.10/site-packages/torchtext/_extension.py", line 64, in _init_extension() File "/opt/conda/lib/python3.10/site-packages/torchtext/_extension.py", line 58, in _init_extension _load_lib("libtorchtext") File "/opt/conda/lib/python3.10/site-packages/torchtext/_extension.py", line 50, in _load_lib torch.ops.load_library(path) File "/opt/conda/lib/python3.10/site-packages/torch/_ops.py", line 643, in load_library ctypes.CDLL(path) File "/opt/conda/lib/python3.10/ctypes/init.py", line 374, in init self._handle = _dlopen(self._name, mode) OSError: /opt/conda/lib/python3.10/site-packages/torchtext/lib/libtorchtext.so: undefined symbol: _ZN2at4_ops10select_int4callERKNS_6TensorEll

abaletinskikh avatar May 13 '23 10:05 abaletinskikh

fast workaround: exec pip install --force-reinstall --no-deps torchtext==0.15.1 in the container

abaletinskikh avatar May 13 '23 11:05 abaletinskikh

Thanks @abaletinskikh for posting the issue and for posting a workaround.

Can confirm that version compatibility is particularly important for torch libraries, and indeed the latest compatible version of torchtext that we support is v0.15.1.

I notice that you are pulling down the python ludwig-gpu:release-0.7 docker image. Was there something about the latest docker image ludwigai/ludwig-gpu:master that didn't work for you?

EDIT: Actually, there have been several dependency updates since the last 0.7 release. I'll recommend continuing to use the ludwigai/ludwig-gpu:release-0.7 as the ludwigai/ludwig-gpu:master image is under active development.

justinxzhao avatar May 15 '23 21:05 justinxzhao

Hey @abaletinskikh, to clarify something, ludwig-gpu:release-0.7 is a bit of an older image, I would recommend updating to ludwig-gpu:release-0.7.4, which should be the latest official image. Can you try using this image and letting us know if you see the same issue?

tgaddair avatar May 16 '23 04:05 tgaddair