donut
donut copied to clipboard
getting no module named lightning module when trying to run the fine tuning code in train.py file of donut model.
hi all,
i am getting the following error
when trying to run the code in the below .py file
https://github.com/clovaai/donut/blob/master/train.py
before that let me tell what i did - i created a virtual environment. python version = 3.9. activated environment.
pip install jupyter pip install torch==1.11.0 pip install torchvision==0.12.0 pip install pytorch-lightning == 1.6.4 when i run this i get below error
pip install transformers==411.3 when i run this is also, i get the same error as mentioned previously
however when i use pip show and see the verison i can see that it has be installed and showed the version
lastly i ran this pip install timm==0.5.4.
after environment got created , i opened the lightning module.py file and then installed python and then ran the rest of code in lightining module.py file. post which i ran the code in train.py file
i hope the steps io followed are right however still i get the following error
no module named lightning module when i run the train.py file
can someone please help me here.
Yes it is probably referring to the lighting_module in the root of this repository: lighting_module.py Make sure you have that file in your working directory (the same directory you run your notebook in) and that you understand the basics of python imports:
https://realpython.com/python-import/ https://saturncloud.io/blog/how-to-import-python-file-as-module-in-jupyter-notebook/