huggingface / huggingface/blog

fails on 'processor = Wav2Vec2ProcessorWithLM.from_pretrained("patrickvonplaten/wav2vec2-base-100h-with-lm")'

Open
#216 6 comments 2 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
3.5k
Forks
1k
Avg merge
1d 20h
Merged PRs (30d)
19

Description

the following step in 'Boosting Wav2Vec2 with n-grams in 🤗 Transformers' colab example fails
```
from transformers import Wav2Vec2ProcessorWithLM
processor = Wav2Vec2ProcessorWithLM.from_pretrained("patrickvonplaten/wav2vec2-base-100h-with-lm")
```
with the following error:
```
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
in ()
1 from transformers import Wav2Vec2ProcessorWithLM
2
----> 3 processor = Wav2Vec2ProcessorWithLM.from_pretrained("patrickvonplaten/wav2vec2-base-100h-with-lm")

1 frames
/usr/local/lib/python3.7/dist-packages/transformers/file_utils.py in requires_backends(obj, backends)
820 name = obj.__name__ if hasattr(obj, "__name__") else obj.__class__.__name__
821 if not all(BACKENDS_MAPPING[backend][0]() for backend in backends):
--> 822 raise ImportError("".join([BACKENDS_MAPPING[backend][1].format(name) for backend in backends]))
823
824

ImportError:
Wav2Vec2ProcessorWithLM requires the pyctcdecode library but it was not found in your environment. You can install it with pip:
`pip install pyctcdecode`

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------
```

Although **pyctcdecode** and **kenlm** installation is successful.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the “Boosting Wav2Vec2 with n-grams in 🤗 Transformers” Colab example and reproduce the Wav2Vec2ProcessorWithLM.from_pretrained step after the documented pyctcdecode and kenlm installations. Check the dependency-installation and processor-loading cells; done means the example loads the processor without the reported missing-library error.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
documentation, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.