Open Anuvathan opened 1 year ago
Same!
Solved by installing version 1.6.4:
pip install pytorch-lightning==1.6.4
The whole module is a bit deprecated, the PyTorch version they add in the README is not compatible with the latest consumer GPUs (f.E. a 4090), and newer PyTorch versions are in turn not compatible with older Lightning versions. You need to port the lightning code over to a newer version, check update guides here: https://lightning.ai/docs/pytorch/latest/upgrade/from_1_6.html
I was getting the same error but managed to resolve with the right mix of library versions. Here are my installed libs for reference: Package Version
absl-py 1.4.0 aiohttp 3.8.4 aiosignal 1.3.1 arabic-reshaper 3.0.0 astunparse 1.6.3 async-timeout 4.0.2 attrs 23.1.0 blend-modes 2.1.0 blinker 1.4 cachetools 5.3.1 certifi 2023.5.7 charset-normalizer 3.1.0 click 8.1.3 cmake 3.26.3 command-not-found 0.3 contourpy 1.0.7 cryptography 3.4.8 cycler 0.11.0 datasets 2.12.0 dbus-python 1.2.18 dill 0.3.6 distro 1.7.0 distro-info 1.1build1 donut 0.2.2 donut-python 1.0.9 filelock 3.12.0 flatbuffers 23.5.26 fonttools 4.39.4 frozenlist 1.3.3 fsspec 2023.5.0 gast 0.4.0 google-auth 2.19.1 google-auth-oauthlib 0.4.6 google-pasta 0.2.0 grpcio 1.54.2 h5py 3.8.0 httplib2 0.20.2 huggingface-hub 0.15.1 idna 3.4 imageio 2.31.0 imgaug 0.4.0 importlib-metadata 4.6.4 jax 0.4.11 jeepney 0.7.1 Jinja2 3.1.2 joblib 1.2.0 keras 2.10.0 Keras-Preprocessing 1.1.2 keyring 23.5.0 kiwisolver 1.4.4 launchpadlib 1.10.16 lazr.restfulclient 0.14.4 lazr.uri 1.0.6 lazy_loader 0.2 libclang 16.0.0 lightning-utilities 0.8.0 lit 16.0.5.post0 Markdown 3.4.3 MarkupSafe 2.1.3 matplotlib 3.7.1 ml-dtypes 0.1.0 more-itertools 8.10.0 mpmath 1.3.0 multidict 6.0.4 multiprocess 0.70.14 munch 3.0.0 netifaces 0.11.0 networkx 3.1 nltk 3.8.1 numpy 1.23.5 nvidia-cublas-cu11 11.10.3.66 nvidia-cublas-cu12 12.1.3.1 nvidia-cuda-cupti-cu11 11.7.101 nvidia-cuda-nvrtc-cu11 11.7.99 nvidia-cuda-runtime-cu11 11.7.99 nvidia-cuda-runtime-cu12 12.1.105 nvidia-cudnn-cu11 8.5.0.96 nvidia-cudnn-cu12 8.9.2.26 nvidia-cufft-cu11 10.9.0.58 nvidia-curand-cu11 10.2.10.91 nvidia-cusolver-cu11 11.4.0.1 nvidia-cusparse-cu11 11.7.4.91 nvidia-nccl-cu11 2.14.3 nvidia-nvtx-cu11 11.7.91 nvidia-tensorrt 99.0.0 oauthlib 3.2.0 opencv-python 4.7.0.72 opt-einsum 3.3.0 packaging 23.1 pandas 2.0.2 Pillow 9.5.0 pip 23.1.2 protobuf 3.19.6 pyarrow 12.0.0 pyasn1 0.5.0 pyasn1-modules 0.3.0 pygame 2.4.0 PyGObject 3.42.1 PyJWT 2.3.0 pyparsing 2.4.7 python-apt 2.4.0+ubuntu1 python-bidi 0.4.2 python-dateutil 2.8.2 pytorch-lightning 1.8.5 pytweening 1.0.7 pytz 2023.3 PyWavelets 1.4.1 PyYAML 5.4.1 regex 2023.6.3 requests 2.31.0 requests-oauthlib 1.3.1 responses 0.18.0 rsa 4.9 ruamel.yaml 0.17.31 ruamel.yaml.clib 0.2.7 safetensors 0.3.1 scikit-image 0.21.0 scipy 1.10.1 sconf 0.2.5 SecretStorage 3.3.1 sentencepiece 0.1.99 setuptools 59.6.0 shapely 2.0.1 six 1.16.0 sympy 1.12 synthtiger 1.2.1 systemd-python 234 tensorboard 2.10.1 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tensorboardX 2.6 tensorflow 2.10.1 tensorflow-estimator 2.10.0 tensorflow-io-gcs-filesystem 0.32.0 tensorrt 8.6.1 tensorrt-bindings 8.6.1 tensorrt-libs 8.6.1 termcolor 2.3.0 tifffile 2023.4.12 timm 0.5.4 tokenizers 0.13.3 torch 1.11.0 torchmetrics 0.11.4 torchvision 0.12.0 tqdm 4.65.0 transformers 4.29.2 triton 2.0.0 typing_extensions 4.6.3 tzdata 2023.3 ubuntu-advantage-tools 8001 ufw 0.36.1 unattended-upgrades 0.1 urllib3 1.26.16 wadllib 1.3.6 Werkzeug 2.3.4 wheel 0.37.1 wrapt 1.14.1 xxhash 3.2.0 yarl 1.9.2 zipp 1.0.0 zss 1.2.0
I think it would be fair to call this a bug. I ran into this, and another related pytorch error, and my understanding of the issue is that the setup.py installs latest pytorch-lightning version, specifying only that version must be >=1.6.4. This now installs Pytorch v2, which in turn does not have certain functions (e.g. pytorch_lightning.utilities.seed
mentioned here) used by the repo code.
The solution to the issue, as I see it, would be to update the setup.py
with more constraints on library versions, such that the donut repo code is still runnable after standard install. That would be preferable to the workarounds people have here of installing donut then uninstalling and reinstalling different versions of certain libraries like pytorch-lightning (and which I've been doing as well).
I could submit a PR if the repo owner(s?) would be amenable...