jerryuhoo / VTuberTalk

Apache License 2.0
372 stars 53 forks source link

运行./run_train.sh报StopIteration #32

Open vandh opened 1 year ago

vandh commented 1 year ago

1、前面步骤正常

2、在运行./run_train.sh时报错, 详细错误如下,请作者和大佬们指点。已经搞了四天四夜了。为了感谢帮助,最后附上遇到的所有问题及解决方案。 (paddlespeech) [root@iotserver VTuberTalk]# ./run_train.sh model: fastspeech2 duration preprocess len train_wav_files 11 len dev_wav_files 1 len test_wav_files 1 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11/11 [00:10<00:00, 1.01it/s] Done Done 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 6.58it/s] Done compute statistics /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/setuptools/sandbox.py:13: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('mpl_toolkits'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11/11 [00:00<00:00, 827.64it/s] /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/setuptools/sandbox.py:13: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('mpl_toolkits'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11/11 [00:00<00:00, 1352.13it/s] /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/setuptools/sandbox.py:13: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('mpl_toolkits'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11/11 [00:00<00:00, 1275.36it/s] normalize /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/setuptools/sandbox.py:13: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('mpl_toolkits'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11/11 [00:00<00:00, 388.37it/s] /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/setuptools/sandbox.py:13: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('mpl_toolkits'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 378.34it/s] /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/setuptools/sandbox.py:13: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('mpl_toolkits'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 368.79it/s] train /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/setuptools/sandbox.py:13: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('mpl_toolkits'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) ========Args======== config: train/conf/fastspeech2/default.yaml dev_metadata: dump/dev/norm/metadata.jsonl ngpu: 1 output_dir: exp/fastspeech2_aishell3_english phones_dict: dump/phone_id_map.txt speaker_dict: dump/speaker_id_map.txt train_metadata: dump/train/norm/metadata.jsonl use_gst: false use_vae: false verbose: 1 voice_cloning: false

========Config======== batch_size: 32 f0max: 400 f0min: 80 fmax: 7600 fmin: 80 fs: 24000 max_epoch: 100 model: adim: 384 aheads: 2 decoder_normalize_before: True dlayers: 4 dunits: 1536 duration_predictor_chans: 256 duration_predictor_kernel_size: 3 duration_predictor_layers: 2 elayers: 4 encoder_normalize_before: True energy_embed_dropout: 0.0 energy_embed_kernel_size: 1 energy_predictor_chans: 256 energy_predictor_dropout: 0.5 energy_predictor_kernel_size: 3 energy_predictor_layers: 2 eunits: 1536 init_dec_alpha: 1.0 init_enc_alpha: 1.0 init_type: xavier_uniform pitch_embed_dropout: 0.0 pitch_embed_kernel_size: 1 pitch_predictor_chans: 256 pitch_predictor_dropout: 0.5 pitch_predictor_kernel_size: 5 pitch_predictor_layers: 5 positionwise_conv_kernel_size: 3 positionwise_layer_type: conv1d postnet_chans: 256 postnet_filts: 5 postnet_layers: 5 reduction_factor: 1 spk_embed_dim: 256 spk_embed_integration_type: concat stop_gradient_from_energy_predictor: False stop_gradient_from_pitch_predictor: True transformer_dec_attn_dropout_rate: 0.2 transformer_dec_dropout_rate: 0.2 transformer_dec_positional_dropout_rate: 0.2 transformer_enc_attn_dropout_rate: 0.2 transformer_enc_dropout_rate: 0.2 transformer_enc_positional_dropout_rate: 0.2 use_scaled_pos_enc: True n_fft: 2048 n_mels: 80 n_shift: 300 num_snapshots: 5 num_workers: 2 optimizer: learning_rate: 0.001 optim: adam seed: 10086 updater: use_masking: True win_length: 1200 window: hann master see the word size: 1, from pid: 52872 rank: 0, pid: 52872, parent_pid: 51326 multiple speaker fastspeech2! spk_num: 1 samplers done! dataloaders done! vocab_size: 96 encoder_type is transformer decoder_type is transformer model done! optimizer done! Exception in main training loop: Traceback (most recent call last): File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddlespeech/t2s/training/trainer.py", line 149, in run update() File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddlespeech/t2s/training/updaters/standard_updater.py", line 107, in update batch = self.read_batch() File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddlespeech/t2s/training/updaters/standard_updater.py", line 179, in read_batch batch = next(self.train_iterator) File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 777, in next six.reraise(sys.exc_info()) File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/six.py", line 719, in reraise raise value File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 744, in next print(self._reader.read_next_list()) Trainer extensions will try to handle the extension. Then all extensions will finalize.Traceback (most recent call last): File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddlespeech/t2s/training/updaters/standard_updater.py", line 176, in read_batch batch = next(self.train_iterator) File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 777, in next six.reraise(sys.exc_info()) File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/six.py", line 719, in reraise raise value File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 744, in next print(self._reader.read_next_list()) StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "train/exps/fastspeech2/train.py", line 233, in main() File "train/exps/fastspeech2/train.py", line 229, in main train_sp(args, config) File "train/exps/fastspeech2/train.py", line 170, in train_sp trainer.run() File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddlespeech/t2s/training/trainer.py", line 198, in run six.reraise(exc_info) File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/six.py", line 719, in reraise raise value File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddlespeech/t2s/training/trainer.py", line 149, in run update() File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddlespeech/t2s/training/updaters/standard_updater.py", line 107, in update batch = self.read_batch() File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddlespeech/t2s/training/updaters/standard_updater.py", line 179, in read_batch batch = next(self.train_iterator) File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 777, in next six.reraise(sys.exc_info()) File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/six.py", line 719, in reraise raise value File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 744, in next print(self._reader.read_next_list()) StopIteration

3、错误汇总 错误一:Could not find a version that satisfies the requirement keras-nightly~=2.5.0.dev pip install keras-nightly -i https://pypi.python.org/simple/

错误二:flask 2.2.2 requires click>=8.0, but you have click 7.1.2 which is incompatible. conda uninstall click conda install click==8.0

错误三:如果遇到CUDA的报错 试试执行export TF_FORCE_GPU_ALLOW_GROWTH=true

错误四:AttributeError: partially initialized module 'charset_normalizer' has no attribute 'md__mypyc' (most likely due to a circular import) pip install --force-reinstall charset-normalizer==3.1.0

错误五:ImportError: cannot import name 'Image' from 'PIL' (unknown location) conda install pillow

错误6:ModuleNotFoundError: No module named 'yaml' conda install pyyaml

错误7:ModuleNotFoundError: No module named 'zipp' conda install zipp

错误8:ImportError: cannot import name 'load' from 'paddleaudio.backends' python3 -m pip install paddleaudio==1.0.1

错误9: File "/home/program/anaconda3/envs/sadtalker/lib/python3.8/site-packages/paddlespeech/t2s/datasets/data_table.py", line 45, in init assert len(data) > 0, "This dataset has no examples" AssertionError: This dataset has no examples pip install paddlespeech==1.0.1

错误10:AttributeError: module 'numpy' has no attribute 'complex'. conda uninstall numpy conda install conda_search conda_search numpy conda install --force-reinstall numpy==1.21.4

错误11:ImportError: libssl.so.1.1: cannot open shared object file: No such file or directory find / -name libssl.so.1.1 find / -name libcrypto.so.1.1 建立软连接 ln -s /usr/local/openssl/lib/libssl.so.1.1 /usr/lib64/libssl.so.1.1 ln -s /usr/local/openssl/lib/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1

错误12: ImportError: cannot import name 'check_argument_types' from 'typeguard' (/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/typeguard/init.py) vi /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/typeguard/init.py

最后一行添加

def check_argument_types():
return True

python -c "from typeguard import check_argument_types;assert check_argument_types()"

错误13: File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddlespeech/t2s/modules/losses.py", line 20, in from paddle.fluid.layers import sequence_mask ImportError: cannot import name 'sequence_mask' from 'paddle.fluid.layers' (/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddle/fluid/layers/init.py) import paddle.fluid.layers as layers 所有sequence_mask改成layers.sequence_mask 错误14:
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject pip install --upgrade numpy

错误15: File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/librosa/core/constantq.py", line 1059, in dtype=np.complex, File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/numpy/init.py", line 305, in getattr raise AttributeError(former_attrs[attr]) AttributeError: module 'numpy' has no attribute 'complex'. vi /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/librosa/core/constantq.py 改dtype=np.complex,为dtype=np.complex128, 错误16: File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/montreal_forced_aligner/dictionary/multispeaker.py", line 1347, in _write_fst_binary f.write(str(self.word_mapping(dictionary.id)["#0"])) KeyError: '#0' vi /home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/montreal_forced_aligner/dictionary/multispeaker.py 1347行加入: if len(self.word_mapping(dictionary.id)) > 0: 错误17: Traceback (most recent call last): File "tools/compute_statistics.py", line 111, in main() File "tools/compute_statistics.py", line 94, in main dataset = DataTable( File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddlespeech/t2s/datasets/data_table.py", line 45, in init__ assert len(data) > 0, "This dataset has no examples" AssertionError: This dataset has no examples
错误18: File "tools/gen_duration_from_textgrid.py", line 30, in readtg for interval in alignment.tierDict["phones"].entryList: AttributeError: 'Textgrid' object has no attribute 'tierDict' 改第30行: for interval in alignment._tierDict["phones"]._entries: 错误19: File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/jsonlines/jsonlines.py", line 627, in open fp = builtins.open(file, mode=mode + "t", encoding=encoding) FileNotFoundError: [Errno 2] No such file or directory: 'dump/dev/raw/metadata.jsonl' vi /home/project/VTuberTalk/train/exps/fastspeech2/preprocess.py 改312行,添加: dev_wav_files = wav_files[9:10] test_wav_files = wav_files[9:10] 错误20:这个问题没有解决,等待大佬相助!!! model done! optimizer done! Exception in main training loop: Traceback (most recent call last): File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddlespeech/t2s/training/trainer.py", line 149, in run update() File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddlespeech/t2s/training/updaters/standard_updater.py", line 107, in update batch = self.read_batch() File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddlespeech/t2s/training/updaters/standard_updater.py", line 179, in read_batch batch = next(self.train_iterator) File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 776, in
next six.reraise(*sys.exc_info()) File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/six.py", line 719, in reraise raise value File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 745, in next__ self._reader.read_next_list()[0]) Trainer extensions will try to handle the extension. Then all extensions will finalize.Traceback (most recent call last): File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddlespeech/t2s/training/updaters/standard_updater.py", line 176, in read_batch batch = next(self.train_iterator) File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 776, in next six.reraise(*sys.exc_info()) File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/six.py", line 719, in reraise raise value File "/home/program/anaconda3/envs/paddlespeech/lib/python3.8/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 745, in next self._reader.read_next_list()[0]) StopIteration