Open benam2 opened 2 years ago
Any help here please @jacobkahn
Any update on this please??? This is really the worse experience ever :( how installing a package is that challenging!!
@benam2 — the build message is pretty clear:
make[2]: *** No rule to make target '/home/ai-labs/fftw-3.3.10/build/libfftw3.so.3', needed by '../lib.linux-x86_64-3.7/libfl_lib_audio.so.0.3.2'. Stop.
This is a known issue with FFTW and isn't an issue with Flashlight -- see https://github.com/FFTW/fftw3/issues/130. You can try building FFTW from source or installing a version that ships FFTW3LibraryDepends.cmake
which will properly define the library target make
is failing to find a rule for.
If you're looking for beam search decoding and not audio featurization components, Python bindings for that have been moved to https://github.com/flashlight/text/.
@jacobkahn You are totally right. The problem is that for some reason building the FFTW3 raises error that's why I stopped using the GitHub to build.
What I finally did to install the flashlight with the help of your suggestion is that to install fftw3 with tools and then sudo cp FFTW3LibraryDepends.cmake /usr/local/lib/cmake/fftw3/
Now flashlight apparently got installed into my coda environment.
But my original problem has not been fixed yet. I have installed flashlight
1,5 month ago and faced with NameError: name 'CriterionType' is not defined
for inferencing an audio for the transcription https://github.com/flashlight/flashlight/issues/1003
I started from scratch to install flashlight again however that error still persist. Do you have any insight what could be wrong?
I really appreciate if you can just spend a few minutes.
@benam2 — are you trying to do decoding? CriterionType
is defined in Flashlight Text -- installations instructions are here. Quickstart instructions for bindings here.
@jacobkahn I'm trying to use s3prl
package to train ASR models. Do you think I should install Flashlight text instead?
@jacobkahn could you please share your idea with me? the reason I started installing flashlight python binding
is that I've given the instruction from someone who had ran the code. Thats why I did not look into the alternative.
Now I think he may have just forgot to share this part with me.
And the reason I don't install the flashlight text binging
without confirmation is that I'm afraid just add a bunch of library that confuses and make it worse. Thats why I really appreciate it if you could help
@benam2 — s3prl depends on Flashlight: Flashlight Text is a requirement, but it isn't clearly documented -- thanks for the callout. I'll send a PR updating that shortly.
@jacobkahn I do apologize for asking so many questions. So for s3prl
I need to install the
flashlight
python bindings
bindings for flashlight text
And since I have done the first two, I will need to do the flashlight text
as well. Is this correct?
@benam2 — after looking at s3prl
, you don't need to build Flashlight
or the Python bindings in this repo -- you only need Flashlight Text
-- quickstart here.
I really don't know how to thank you :), and I hope you don't mind if I mention you in case I faced with error (hopefully I won't )
Thank again @jacobkahn
@jacobkahn I just ran these:
git clone https://github.com/flashlight/text && cd text
cd bindings/python
python3 setup.py install
And then after running the asr this error raises:
[Override] - config.downstream_expert.datarc.decoder_args.decoder_type = kenlm
[Override] - config.downstream_expert.datarc.decoder_args.kenlm_model = ./language_model/4-gram.arpa.gz
[Override] - config.downstream_expert.datarc.decoder_args.lexicon = ./language_model/librispeech_lexicon.lst
/home/ai-labs-sgoudarzvand/.conda/envs/asr/lib/python3.7/site-packages/transformers/configuration_utils.py:365: UserWarning: Passing `gradient_checkpointing` to a config initialization is deprecated and will be removed in v5 Transformers. Using `model.gradient_checkpointing_enable()` instead, or if you are using the `Trainer` API, pass `gradient_checkpointing=True` in your `TrainingArguments`.
"Passing `gradient_checkpointing` to a config initialization is deprecated and will be removed in v5 "
Some weights of the model checkpoint at facebook/wav2vec2-base were not used when initializing Wav2Vec2Model: ['quantizer.codevectors', 'quantizer.weight_proj.bias', 'project_hid.weight', 'quantizer.weight_proj.weight', 'project_q.weight', 'project_q.bias', 'project_hid.bias']
- This IS expected if you are initializing Wav2Vec2Model from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing Wav2Vec2Model from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
[Featurizer for <class 's3prl.upstream.wav2vec2_hug.expert.UpstreamExpert'>] - The input upstream is only for initialization and not saved in this nn.Module
[Featurizer for <class 's3prl.upstream.wav2vec2_hug.expert.UpstreamExpert'>] - Take a list of 13 features and weighted sum them.
[Runner] - Loading Featurizer weights from the previous experiment
/home/ai-labs-sgoudarzvand/Desktop/ASR/s3prl/s3prl/downstream/asr/w2l_decoder.py:42: UserWarning: flashlight python bindings are required to use this functionality. Please install from https://github.com/facebookresearch/flashlight/tree/master/bindings/python
"flashlight python bindings are required to use this functionality. Please install from [https://github.com/facebookresearch/flashlight/tree/master/bindings/python"](https://github.com/facebookresearch/flashlight/tree/master/bindings/python%22)
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/tmp/ipykernel_15148/2167564801.py in <module>
31
32 upstream = 'wav2vec2_hug_base_960'
---> 33 runner = Runner(args, config)
~/Desktop/ASR/s3prl/s3prl/downstream/runner.py in __init__(self, args, config)
50 self.upstream = self._get_upstream()
51 self.featurizer = self._get_featurizer()
---> 52 self.downstream = self._get_downstream()
53 self.all_entries = [self.upstream, self.featurizer, self.downstream]
54
~/Desktop/ASR/s3prl/s3prl/downstream/runner.py in _get_downstream(self)
131 upstream_rate = self.featurizer.model.downsample_rate,
132 **self.config,
--> 133 **vars(self.args)
134 ).to(self.args.device)
135
~/Desktop/ASR/s3prl/s3prl/downstream/asr/expert.py in __init__(self, upstream_dim, upstream_rate, downstream_expert, expdir, **kwargs)
97 )
98 decoder_args = self.datarc.get('decoder_args')
---> 99 self.decoder = get_decoder(decoder_args, self.dictionary)
100 self.register_buffer('best_score', torch.ones(1) * 100)
101
~/Desktop/ASR/s3prl/s3prl/downstream/asr/expert.py in get_decoder(decoder_args_dict, dictionary)
34 if isinstance(decoder_args.unk_weight, str):
35 decoder_args.unk_weight = eval(decoder_args.unk_weight)
---> 36 return W2lKenLMDecoder(decoder_args, dictionary)
37
38 return None
~/Desktop/ASR/s3prl/s3prl/downstream/asr/w2l_decoder.py in __init__(self, args, tgt_dict)
124 class W2lKenLMDecoder(W2lDecoder):
125 def __init__(self, args, tgt_dict):
--> 126 super().__init__(args, tgt_dict)
127
128 self.unit_lm = getattr(args, "unit_lm", False)
~/Desktop/ASR/s3prl/s3prl/downstream/asr/w2l_decoder.py in __init__(self, args, tgt_dict)
53
54 # criterion-specific init
---> 55 self.criterion_type = CriterionType.CTC
56 self.blank = (
57 tgt_dict.index("<ctc_blank>")
NameError: name 'CriterionType' is not defined
I can't get from the error itself what could be missing @jacobkahn
Sorry again @jacobkahn but if you have an even a remote idea what else could be related to this error, I would really really appreciate if you could share with me. Its been too long I got stuck on this project .
Im trying to install Flashlight to get a speech recognition project run. Its been really 2 weeks now!!! I have made mistake before and cleaned up everything and started from scratch. Now I have installed the flashlight and then when I want to install the python bindings after nearly 60 percent of the building going it raises a VERY WEIRD ERROR that I really don't know how to search the error since there is little to share.
Reproduction Steps
[Steps to reproduce. Please include, if needed for your issue:
python3 setup.py install
This is the error part:
I really, truly appreciate it if you can help me to finish this last part or hint something that I can fix it .