Closed Sreyan88 closed 1 year ago
I was able to fix this error, however now I get a new error:
ImportError: cannot import name 'distributed_utils' from 'fairseq' (unknown location)
from fairseq import distributed_utils, metrics
from fairseq import distributed_utils, metrics
ImportError: cannot import name 'distributed_utils' from 'fairseq' (unknown location)
ImportError: cannot import name 'distributed_utils' from 'fairseq' (unknown location)
Traceback (most recent call last):
Hi, this looks like a fairseq installation problem, can you check whether your fairseq is installed successfully?
My sh file looks like this:
#!/usr/bin/env bash
DATA_DIR=/fs/nexus-scratch/sreyang/test/dataset/manifest
LABEL_DIR=/fs/nexus-scratch/sreyang/test/dataset/dump/100/kmeans_output
FAIRSEQ_PATH=/fs/nexus-scratch/sreyang/test/new/SpeechT5/Speech2C/fairseq
python ${FAIRSEQ_PATH}/fairseq_cli/hydra_train.py \
--config-dir speech2c/config \
--config-name speech2c_base_librispeech \
task.data=${DATA_DIR} task.label_dir=${LABEL_DIR} task.labels='["km"]' \
model.label_rate=100 common.user_dir=/fs/nexus-scratch/sreyang/test/new/SpeechT5/Speech2C/speech2c \
and I run it from:
/fs/nexus-scratch/sreyang/test/new/SpeechT5/Speech2C
which has two folders fairseq and speech2c. The installation looks fine, as data2vec training works fine. I even tried installing the latest fairseq version in the same folder.
The script looks ok.
You should be able to execute the code from fairseq import distributed_utils, metrics
from any programs after installing the fairseq. This may not be a problem of Speech2C, but related to fairseq or your python environment.
Looks like moving speech2c folder to fairseq/examples
worked for me. If this is actually needed, would please request you to update the readme!
Thank You for the help again!
Hi, thanks for your suggestions, but I did not get this error in my program... Anyway, glad to know that you fix this error!
Hi there,
Great repo and paper. I follow the exact installation and data prep steps for Speech2C training and get this error when I run the pre_training command:
AssertionError: number of labels does not match (5567 != 5566)
Any help would be appreciated!
Additionally, I also had to change:
dir: ./
in config and
common.user_dir=speech2c
to make the code work.