実現したいこと
- [ ]run.shを動かし、機械学習を進めたい。
前提
WSL2を使用してUbuntuでESPNetの機械学習をしたいと思っており、こちらのサイトなどを参考に環境を整え、MYCOEIROINKのコードを参考にしてコードを実行しようとしました。
ですが、いざ実行しようとすると「ImportError: cannot import name 'check_argument_types' from 'typeguard' 」と出てきて実行することができません。
エラーメッセージを検索した結果出てきたサイトの解決方法も試しましたが、うまくいきませんでした。
発生している問題・エラーメッセージ
2023-03-20 18:04:06,056 (launch:349) INFO: log file: /home/kukisoji/content/drive/MyDrive/MYCOEIROINK_WORK/exp/tts_mycoe_model/train.log run.pl: job failed, log is in /home/kukisoji/content/drive/MyDrive/MYCOEIROINK_WORK/exp/tts_mycoe_model/train.log Command '['run.pl', '--name', '/home/kukisoji/content/drive/MyDrive/MYCOEIROINK_WORK/exp/tts_mycoe_model/train.log', '--gpu', '1', '/home/kukisoji/content/drive/MyDrive/MYCOEIROINK_WORK/exp/tts_mycoe_model/train.log', 'python3', '-m', 'espnet2.bin.gan_tts_train', '--use_preprocessor', 'true', '--token_type', 'phn', '--token_list', 'dump/44k/token_list/phn_jaconv_pyopenjtalk_prosody/tokens.txt', '--non_linguistic_symbols', 'none', '--cleaner', 'jaconv', '--g2p', 'pyopenjtalk_prosody', '--normalize', 'none', '--resume', 'true', '--fold_length', '150', '--fold_length', '409600', '--output_dir', '/home/kukisoji/content/drive/MyDrive/MYCOEIROINK_WORK/exp/tts_mycoe_model', '--config', './conf/finetune.yaml', '--feats_extract', 'linear_spectrogram', '--feats_extract_conf', 'n_fft=2048', '--feats_extract_conf', 'hop_length=512', '--feats_extract_conf', 'win_length=null', '--train_data_path_and_name_and_type', 'dump/44k/raw/tr_no_dev/text,text,text', '--train_data_path_and_name_and_type', 'dump/44k/raw/tr_no_dev/wav.scp,speech,sound', '--train_shape_file', '/home/kukisoji/content/drive/MyDrive/MYCOEIROINK_WORK/exp/tts_stats_raw_linear_spectrogram_phn_jaconv_pyopenjtalk_prosody/train/text_shape.phn', '--train_shape_file', '/home/kukisoji/content/drive/MyDrive/MYCOEIROINK_WORK/exp/tts_stats_raw_linear_spectrogram_phn_jaconv_pyopenjtalk_prosody/train/speech_shape', '--valid_data_path_and_name_and_type', 'dump/44k/raw/dev/text,text,text', '--valid_data_path_and_name_and_type', 'dump/44k/raw/dev/wav.scp,speech,sound', '--valid_shape_file', '/home/kukisoji/content/drive/MyDrive/MYCOEIROINK_WORK/exp/tts_stats_raw_linear_spectrogram_phn_jaconv_pyopenjtalk_prosody/valid/text_shape.phn', '--valid_shape_file', '/home/kukisoji/content/drive/MyDrive/MYCOEIROINK_WORK/exp/tts_stats_raw_linear_spectrogram_phn_jaconv_pyopenjtalk_prosody/valid/speech_shape', '--init_param', 'downloads/100epoch.pth:tts:tts', '--ngpu', '1', '--multiprocessing_distributed', 'True']' returned non-zero exit status 1. Traceback (most recent call last): File "/opt/python/3.9.16/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/opt/python/3.9.16/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/kukisoji/content/espnet/espnet2/bin/launch.py", line 385, in <module> main() File "/home/kukisoji/content/espnet/espnet2/bin/launch.py", line 376, in main raise RuntimeError( RuntimeError: ################### The last 1000 lines of /home/kukisoji/content/drive/MyDrive/MYCOEIROINK_WORK/exp/tts_mycoe_model/train.log ################### # python3 -m espnet2.bin.gan_tts_train --use_preprocessor true --token_type phn --token_list dump/44k/token_list/phn_jaconv_pyopenjtalk_prosody/tokens.txt --non_linguistic_symbols none --cleaner jaconv --g2p pyopenjtalk_prosody --normalize none --resume true --fold_length 150 --fold_length 409600 --output_dir /home/kukisoji/content/drive/MyDrive/MYCOEIROINK_WORK/exp/tts_mycoe_model --config ./conf/finetune.yaml --feats_extract linear_spectrogram --feats_extract_conf n_fft=2048 --feats_extract_conf hop_length=512 --feats_extract_conf win_length=null --train_data_path_and_name_and_type dump/44k/raw/tr_no_dev/text,text,text --train_data_path_and_name_and_type dump/44k/raw/tr_no_dev/wav.scp,speech,sound --train_shape_file /home/kukisoji/content/drive/MyDrive/MYCOEIROINK_WORK/exp/tts_stats_raw_linear_spectrogram_phn_jaconv_pyopenjtalk_prosody/train/text_shape.phn --train_shape_file /home/kukisoji/content/drive/MyDrive/MYCOEIROINK_WORK/exp/tts_stats_raw_linear_spectrogram_phn_jaconv_pyopenjtalk_prosody/train/speech_shape --valid_data_path_and_name_and_type dump/44k/raw/dev/text,text,text --valid_data_path_and_name_and_type dump/44k/raw/dev/wav.scp,speech,sound --valid_shape_file /home/kukisoji/content/drive/MyDrive/MYCOEIROINK_WORK/exp/tts_stats_raw_linear_spectrogram_phn_jaconv_pyopenjtalk_prosody/valid/text_shape.phn --valid_shape_file /home/kukisoji/content/drive/MyDrive/MYCOEIROINK_WORK/exp/tts_stats_raw_linear_spectrogram_phn_jaconv_pyopenjtalk_prosody/valid/speech_shape --init_param downloads/100epoch.pth:tts:tts --ngpu 1 --multiprocessing_distributed True # Started at Mon Mar 20 18:04:06 JST 2023 # Traceback (most recent call last): File "/opt/python/3.9.16/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/opt/python/3.9.16/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/kukisoji/content/espnet/espnet2/bin/gan_tts_train.py", line 2, in <module> from espnet2.tasks.gan_tts import GANTTSTask File "/home/kukisoji/content/espnet/espnet2/tasks/gan_tts.py", line 19, in <module> from typeguard import check_argument_types ImportError: cannot import name 'check_argument_types' from 'typeguard' (/home/kukisoji/content/espnet/tools/venv/lib/python3.9/site-packages/typeguard/__init__.py) # Accounting: time=0 threads=1 # Ended (code 1) at Mon Mar 20 18:04:06 JST 2023, elapsed time 0 seconds
該当のソースコード
./run.sh --stage 6 --stop-stage 6 --ngpu 1 --fs 44100 --n_fft 2048 --n_shift 512 --win_length null --dumpdir dump/44k --expdir /home/kukisoji/content/drive/MyDrive/MYCOEIROINK_WORK/exp --tts_task gan_tts --feats_extract linear_spectrogram --feats_normalize none --train_config ./conf/finetune.yaml --train_args "--init_param downloads/100epoch.pth:tts:tts" --tag mycoe_model
試したこと
このサイトを参考にして、typing-extensionsのアップデートを行いました。
次にこちらのサイトに「typeguardもしくはtyping_extensionsどちらか単体にする」という解決方法があったため、typeguardもしくはtyping_extensionsどちらか一方だけにしたりしましたが、ダメでした。
補足情報(FW/ツールのバージョンなど)
使用環境:WSL2/Ubuntu 22.04.2
Python3.9.16

回答1件
あなたの回答
tips
プレビュー