mariegold/NP-Attack

Can you tell me all versions of your python package in requirements.txt (hydra-core jiwer librosa tqdm)

Opened this issue · 3 comments

After "git clone ..." "pip install -r requirements.txt" "python main.py",I got the follows:
[
strategy:
name: predictor
n_points: 64
norm: 'inf'
predictor:
norm: ${strategy.norm}
n_layers: 4
batch_size: 32
epochs: 300
search_step: 200
sample_size: 8
lr: 0.0001
dir: ${hydra:runtime.cwd}/data
attacker: ${strategy.name}
sr: 16000
budget: 5000
eps_perb: 0.0
min_wer: 1.0e-09
seed: 1234
upper_lim: 2.0
norm: 'inf'
asr:
name: asr-transformer-transformerlm-librispeech
source: speechbrain/${asr.name}
savedir: ${dir}/pretrained_models/${asr.name}
wave_file: ${dir}/237-134500-0001.flac
out: false
out_file: res.out

[2022-06-15 22:56:13,819][speechbrain.pretrained.fetching][INFO] - Fetch hyperparams.yaml: Using existing file/symlink in /home/fx/documents/gitfiles/NP-Attack/data/pretrained_models/asr-transformer-transformerlm-librispeech/hyperparams.yaml.
Error executing job with overrides: []
Traceback (most recent call last):
File "main.py", line 14, in main
model = NPAttacker(args)
File "/home/fx/documents/gitfiles/NP-Attack/models/attacker.py", line 15, in init
self.asr = ASR(hp.asr, device)
File "/home/fx/documents/gitfiles/NP-Attack/models/model.py", line 8, in init
self.model = EncoderDecoderASR.from_hparams(
File "/home/fx/miniconda3/envs/npattack/lib/python3.8/site-packages/speechbrain/pretrained/interfaces.py", line 230, in from_hparams
hparams = load_hyperpyyaml(fin, overrides)
File "/home/fx/miniconda3/envs/npattack/lib/python3.8/site-packages/hyperpyyaml/core.py", line 182, in load_hyperpyyaml
hparams = yaml.load(yaml_stream, Loader=yaml.Loader)
File "/home/fx/miniconda3/envs/npattack/lib/python3.8/site-packages/yaml/init.py", line 81, in load
return loader.get_single_data()
File "/home/fx/miniconda3/envs/npattack/lib/python3.8/site-packages/yaml/constructor.py", line 51, in get_single_data
return self.construct_document(node)
File "/home/fx/miniconda3/envs/npattack/lib/python3.8/site-packages/yaml/constructor.py", line 55, in construct_document
data = self.construct_object(node)
File "/home/fx/miniconda3/envs/npattack/lib/python3.8/site-packages/yaml/constructor.py", line 107, in construct_object
for dummy in generator:
File "/home/fx/miniconda3/envs/npattack/lib/python3.8/site-packages/yaml/constructor.py", line 413, in construct_yaml_map
value = self.construct_mapping(node)
File "/home/fx/miniconda3/envs/npattack/lib/python3.8/site-packages/yaml/constructor.py", line 218, in construct_mapping
return super().construct_mapping(node, deep=deep)
File "/home/fx/miniconda3/envs/npattack/lib/python3.8/site-packages/yaml/constructor.py", line 143, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File "/home/fx/miniconda3/envs/npattack/lib/python3.8/site-packages/yaml/constructor.py", line 102, in construct_object
data = constructor(self, tag_suffix, node)
File "/home/fx/miniconda3/envs/npattack/lib/python3.8/site-packages/hyperpyyaml/core.py", line 429, in construct_object
return callable
(*args, **kwargs)
TypeError: ('Invalid argument to class speechbrain.lobes.models.transformer.TransformerASR.TransformerASR', "init() got an unexpected keyword argument 'attention_type'")

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

]

Hi, it seems to me from the error you get that the problem is the SpeechBrain model, for which a new version has been released. Downloading the old version should fix this:

cd data/
mkdir pretrained_models
cd pretrained_models
git clone https://huggingface.co/speechbrain/asr-transformer-transformerlm-librispeech/tree/a16097eddf7328f2c35e8ef77d02719eb98a9cbd

Hi, it seems to me from the error you get that the problem is the SpeechBrain model, for which a new version has been released. Downloading the old version should fix this:

cd data/
mkdir pretrained_models
cd pretrained_models
git clone https://huggingface.co/speechbrain/asr-transformer-transformerlm-librispeech/tree/a16097eddf7328f2c35e8ef77d02719eb98a9cbd

Hello, I hope I'm not disturbing you. The branch "a16097eddf7328f2c35e8ef77d02719eb98a9cbd" in the link you provided is no longer functional. Currently, only the "main" branch exists in this project. Could you please provide me with a copy of the file you copied using a web transfer or another method?

Hi, it seems to me from the error you get that the problem is the SpeechBrain model, for which a new version has been released. Downloading the old version should fix this:

cd data/
mkdir pretrained_models
cd pretrained_models
git clone https://huggingface.co/speechbrain/asr-transformer-transformerlm-librispeech/tree/a16097eddf7328f2c35e8ef77d02719eb98a9cbd

Hello, I hope I'm not disturbing you. The branch "a16097eddf7328f2c35e8ef77d02719eb98a9cbd" in the link you provided is no longer functional. Currently, only the "main" branch exists in this project. Could you please provide me with a copy of the file you copied using a web transfer or another method?

I got this, Just need to comment out the "attention" and "causal" options in the "Transformer" section of hyperparams.yaml.