(This is from #5283. I though it is better to separate since it is the new kind of error)
I tried to reproduce wav2vec-U 2.0 with python 3.8. When I ran the GAN training script from README, however, I got the following message. I want to know how to fix this error (either by changing to code or preparing data again etc.)
Traceback (most recent call last):
File "/mnt/hdd/esyoon/anaconda3/envs/iclr24/bin/fairseq-hydra-train", line 8, in <module>
sys.exit(cli_main())
File "/mnt/hdd/esyoon/workspace/ICLR24/fairseq/fairseq_cli/hydra_train.py", line 87, in cli_main
hydra_main()
File "/mnt/hdd/esyoon/anaconda3/envs/iclr24/lib/python3.7/site-packages/hydra/main.py", line 37, in decorated_main
strict=strict,
File "/mnt/hdd/esyoon/anaconda3/envs/iclr24/lib/python3.7/site-packages/hydra/_internal/utils.py", line 355, in _run_hydra
lambda: hydra.multirun(
File "/mnt/hdd/esyoon/anaconda3/envs/iclr24/lib/python3.7/site-packages/hydra/_internal/utils.py", line 201, in run_and_report
raise ex
File "/mnt/hdd/esyoon/anaconda3/envs/iclr24/lib/python3.7/site-packages/hydra/_internal/utils.py", line 198, in run_and_report
return func()
File "/mnt/hdd/esyoon/anaconda3/envs/iclr24/lib/python3.7/site-packages/hydra/_internal/utils.py", line 358, in <lambda>
overrides=args.overrides,
File "/mnt/hdd/esyoon/anaconda3/envs/iclr24/lib/python3.7/site-packages/hydra/_internal/hydra.py", line 136, in multirun
return sweeper.sweep(arguments=task_overrides)
File "/mnt/hdd/esyoon/anaconda3/envs/iclr24/lib/python3.7/site-packages/hydra/_internal/core_plugins/basic_sweeper.py", line 154, in sweep
results = self.launcher.launch(batch, initial_job_idx=initial_job_idx)
File "/mnt/hdd/esyoon/anaconda3/envs/iclr24/lib/python3.7/site-packages/hydra/_internal/core_plugins/basic_launcher.py", line 80, in launch
job_subdir_key="hydra.sweep.subdir",
File "/mnt/hdd/esyoon/anaconda3/envs/iclr24/lib/python3.7/site-packages/hydra/core/utils.py", line 129, in run_job
ret.return_value = task_function(task_cfg)
File "/mnt/hdd/esyoon/workspace/ICLR24/fairseq/fairseq_cli/hydra_train.py", line 27, in hydra_main
_hydra_main(cfg)
File "/mnt/hdd/esyoon/workspace/ICLR24/fairseq/fairseq_cli/hydra_train.py", line 56, in _hydra_main
distributed_utils.call_main(cfg, pre_main, **kwargs)
File "/mnt/hdd/esyoon/workspace/ICLR24/fairseq/fairseq/distributed/utils.py", line 404, in call_main
main(cfg, **kwargs)
File "/mnt/hdd/esyoon/workspace/ICLR24/fairseq/fairseq_cli/train.py", line 205, in main
valid_losses, should_stop = train(cfg, trainer, task, epoch_itr)
File "/mnt/hdd/esyoon/anaconda3/envs/iclr24/lib/python3.7/contextlib.py", line 74, in inner
return func(*args, **kwds)
File "/mnt/hdd/esyoon/workspace/ICLR24/fairseq/fairseq_cli/train.py", line 331, in train
log_output = trainer.train_step(samples)
File "/mnt/hdd/esyoon/anaconda3/envs/iclr24/lib/python3.7/contextlib.py", line 74, in inner
return func(*args, **kwds)
File "/mnt/hdd/esyoon/workspace/ICLR24/fairseq/fairseq/trainer.py", line 850, in train_step
**extra_kwargs,
File "/mnt/hdd/esyoon/workspace/ICLR24/fairseq/fairseq/tasks/fairseq_task.py", line 532, in train_step
loss, sample_size, logging_output = criterion(model, sample)
File "/mnt/hdd/esyoon/anaconda3/envs/iclr24/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/mnt/hdd/esyoon/workspace/ICLR24/fairseq/fairseq/criterions/model_criterion.py", line 56, in forward
net_output = model(**sample["net_input"])
File "/mnt/hdd/esyoon/anaconda3/envs/iclr24/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/mnt/hdd/esyoon/workspace/ICLR24/fairseq/examples/wav2vec/unsupervised/models/wav2vec_u.py", line 602, in forward
token_y = self.discriminator(token_x, token_padding_mask)
File "/mnt/hdd/esyoon/anaconda3/envs/iclr24/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/mnt/hdd/esyoon/workspace/ICLR24/fairseq/examples/wav2vec/unsupervised/models/wav2vec_u.py", line 271, in forward
x = x.transpose(1, 2) # BTC -> BCT
AttributeError: 'NoneType' object has no attribute 'transpose'
PREFIX=w2v_unsup_gan_xp
FAIRSEQ_ROOT=/mnt/hdd/esyoon/workspace/ICLR24/fairseq
# For wav2vec-U 2.0, use raw audio features
CONFIG_NAME=w2vu2
TASK_DATA=/mnt/hdd/esyoon/workspace/ICLR24/fairseq/examples/wav2vec/unsupervised/audiofiles/preprocessed_v2/train-clean-100
# Unpaired text input
TEXT_DATA=/mnt/hdd/esyoon/workspace/ICLR24/fairseq/examples/wav2vec/unsupervised/texts/phones # path to fairseq-preprocessed GAN data (phones dir)
KENLM_PATH=/mnt/hdd/esyoon/workspace/ICLR24/fairseq/examples/wav2vec/unsupervised/texts/train-clean-360/phones/lm.phones.filtered.04.bin # KenLM 4-gram phoneme language model (LM data = GAN data here)
PYTHONPATH=${FAIRSEQ_ROOT} PREFIX=${PREFIX} fairseq-hydra-train \
-m --config-dir /mnt/hdd/esyoon/workspace/ICLR24/fairseq/examples/wav2vec/unsupervised/config/gan \
--config-name $CONFIG_NAME \
task.data=${TASK_DATA} \
task.text_data=${TEXT_DATA} \
task.kenlm_path=${KENLM_PATH} \
common.user_dir=${FAIRSEQ_ROOT}/examples/wav2vec/unsupervised \
model.code_penalty=2,4 model.gradient_penalty=1.5,2.0 \
model.smoothness_weight=0.5,0.75,1.0 'common.seed=range(0,1)'
What have you tried?
I found that the same issue was occurred at #3693. Although the issue is closed, it is due to a prolonged period of inactivity and I still do not have a clear clue on how to fix this error. I do find that random_label=None in the forward pass is causing such error, but still I do not get the resolution.
What's your environment?
fairseq Version (e.g., 1.0 or main): main
PyTorch Version 2.0.1+cu117
OS (e.g., Linux): Linux
How you installed fairseq (pip, source): pip install --editable ./
Build command you used (if compiling from source):
❓ Questions and Help
What is your question?
(This is from #5283. I though it is better to separate since it is the new kind of error)
I tried to reproduce wav2vec-U 2.0 with python 3.8. When I ran the GAN training script from README, however, I got the following message. I want to know how to fix this error (either by changing to code or preparing data again etc.)
The log looks like:
Code
What have you tried?
I found that the same issue was occurred at #3693. Although the issue is closed, it is due to a prolonged period of inactivity and I still do not have a clear clue on how to fix this error. I do find that random_label=None in the forward pass is causing such error, but still I do not get the resolution.
What's your environment?
pip
, source): pip install --editable ./