Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting no module named lightning module when trying to run the fine tuning code in train.py file of donut model. #280

Open
svocdfrockz opened this issue Jan 11, 2024 · 1 comment

Comments

@svocdfrockz
Copy link

hi all,

i am getting the following error

WhatsApp Image 2024-01-11 at 19 56 40

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

WhatsApp Image 2024-01-11 at 19 56 40

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.

@felixvor
Copy link

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants