cannot import name 'Data2VecForCTC' from 'transformers'
See original GitHub issueSystem Info
- `transformers` version: 4.18.0
- Platform: Linux-5.13.0-40-generic-x86_64-with-glibc2.31
- Python version: 3.9.7
- Huggingface_hub version: 0.2.1
- PyTorch version (GPU?): 1.11.0 (True)
- Tensorflow version (GPU?): 2.7.0 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>
Who can help?
Information
- The official example scripts
- My own modified scripts
Tasks
- An officially supported task in the
examples
folder (such as GLUE/SQuAD, …) - My own task or dataset (give details below)
Reproduction
Following the code sample in https://huggingface.co/facebook/data2vec-audio-large-960h I’m trying to import the name Data2VecForCTC, but unsuccessful. Possibly a typo: Data2VecForCTC -> Data2VecAudioForCTC
Expected behavior
Correct code sample is expected.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Wav2Vec2ForCTC and Wav2Vec2Tokenizer - Beginners
ImportError: cannot import name 'Wav2Vec2ForCTC' from 'transformers' (c:\python\python37\lib\site-packages\transformers_init_.py).
Read more >How to resolve the hugging face error ImportError: cannot ...
SO related: Transformer: Error importing packages. "ImportError: cannot import name 'SAVE_STATE_WARNING' from 'torch.optim.lr_scheduler'"; HF ...
Read more >cannot import name 'pegasusforconditionalgeneration ...
The message suggests that the import is not available in your transformers installation. You should manually check that it has been installed ...
Read more >transformer-utils
transformer -utils. Utilities for the HuggingFace transformers library, focused on loading and using large pretrained autoregressive language models like ...
Read more >How to use the transformers.BertTokenizer function in ...
try: from torch.utils.tensorboard import SummaryWriter except ImportError: from tensorboardX import SummaryWriter logger = logging.getLogger(__name__) ...
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
But yes I’ll fix it, thanks for reporting
Here it is: https://github.com/huggingface/transformers/blob/dced262409177586bb510b6b724c762fb89da0e8/src/transformers/__init__.py#L880
Note that:
should also already work on master