ModuleNotFoundError: No module named 'transformers.pytorch_transformers'
See original GitHub issueHi, thank for your work.
I’m trying to finetune for image captioning task. When i run
python oscar/run_captioning.py \
--model_name_or_path pretrained_models/base-vg-labels/ep_67_588997 \
--do_train \
--do_lower_case \
--evaluate_during_training \
--add_od_labels \
--learning_rate 0.00003 \
--per_gpu_train_batch_size 64 \
--num_train_epochs 30 \
--save_steps 5000 \
--output_dir output/
I encounter this error
2021-02-04 06:41:10.151589: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib:/usr/local/cuda/lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
2021-02-04 06:41:10.151621: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
File "test.py", line 5, in <module>
from transformers.pytorch_transformers.modeling_utils import PreTrainedModel
ModuleNotFoundError: No module named 'transformers.pytorch_transformers'
I clone this repo with cmd
git clone https://github.com/microsoft/Oscar.git
git submodule init
git submodule update
How could i fix this issue?
Issue Analytics
- State:
- Created 3 years ago
- Comments:12
Top Results From Across the Web
No Module named Transformers · Issue #3342 - GitHub
Bug No module found transformers Information Package Version absl-py 0.9.0 astor ... ModuleNotFoundError: No module named 'transformers' ...
Read more >Module Not Found Error when importing Pytorch_Transformers
You are missing the pytorch-transformers dependency. Try installing it with the following command: pip install pytorch-transformers.
Read more >ModuleNotFoundError: No module named 'pytorch-transformers'
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'pytorch-transformers' How to remove t.
Read more >modulenotfounderror: no module named 'transformers' ( Solved )
You will get modulenotfounderror: no module named 'transformers' generally when you will you have not properly installed transformer package on your system.
Read more >No module named 'pytorch-transformers' - Copy Paste Guru
How to fix "ModuleNotFoundError: No module named 'pytorch-transformers'" ... You must first install the package before you can use it in your code....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
pip uninstall transformers
thank you @alice-cool