babysor / babysor/MockingBird

预训练时报错

Open
#915 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
36.9k
Forks
5.2k
PR merge metrics
No merged PRs in 30d

Description

执行python pre.py -d {dataset} -n {number}指令后报如下错误,请问是什么原因
![image](https://github.com/babysor/MockingBird/assets/136776911/814ee0e0-6d39-47e0-b602-4d4272dda631)

(mb) D:\project\MockingBird\MockingBird>
(mb) D:\project\MockingBird\MockingBird>
(mb) D:\project\MockingBird\MockingBird>python pre.py D:\project\MockingBird\dataset -d aidatatang_200zh
C:\Users\whh\.conda\envs\mb\lib\site-packages\transformers\models\wav2vec2\processing_wav2vec2.py:53: FutureWarning: Loading a tokenizer inside Wav2Vec2Processor from a config that does not include a `tokenizer_class` attribute is deprecated and will be removed in v5. Please add `'tokenizer_class': 'Wav2Vec2CTCTokenizer'` attribute to either your `config.json` or `tokenizer_config.json` file to suppress this warning:
warnings.warn(
Traceback (most recent call last):
File "C:\Users\whh\.conda\envs\mb\lib\site-packages\transformers\utils\hub.py", line 417, in cached_file
resolved_file = hf_hub_download(
File "C:\Users\whh\.conda\envs\mb\lib\site-packages\huggingface_hub\utils\_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "C:\Users\whh\.conda\envs\mb\lib\site-packages\huggingface_hub\file_download.py", line 1291, in hf_hub_download
raise LocalEntryNotFoundError(
huggingface_hub.utils._errors.LocalEntryNotFoundError: Connection error, and we cannot find the requested files in the disk cache. Please try again or make sure your Internet connection is on.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\whh\.conda\envs\mb\lib\site-packages\transformers\models\wav2vec2\processing_wav2vec2.py", line 51, in from_pretrained
return super().from_pretrained(pretrained_model_name_or_path, **kwargs)
File "C:\Users\whh\.conda\envs\mb\lib\site-packages\transformers\processing_utils.py", line 184, in from_pretrained
args = cls._get_arguments_from_pretrained(pretrained_model_name_or_path, **kwargs)
File "C:\Users\whh\.conda\envs\mb\lib\site-packages\transformers\processing_utils.py", line 228, in _get_arguments_from_pretrained
args.append(attribute_class.from_pretrained(pretrained_model_name_or_path, **kwargs))
File "C:\Users\whh\.conda\envs\mb\lib\site-packages\transformers\feature_extraction_utils.py", line 338, in from_pretrained
feature_extractor_dict, kwargs = cls.get_feature_extractor_dict(pretrained_model_name_or_path, **kwargs)
File "C:\Users\whh\.conda\envs\mb\lib\site-packages\transformers\feature_extraction_utils.py", line 438, in get_feature_extractor_dict
resolved_feature_extractor_file = cached_file(
File "C:\Users\whh\.conda\envs\mb\lib\site-packages\transformers\utils\hub.py", line 452, in cached_file
raise EnvironmentError(
OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like audeering/wav2vec2-large-robust-12-ft-emotion-msp-dim is not the path to a directory containing a file named preprocessor_config.json.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\whh\.conda\envs\mb\lib\site-packages\transformers\utils\hub.py", line 417, in cached_file
resolved_file = hf_hub_download(
File "C:\Users\whh\.conda\envs\mb\lib\site-packages\huggingface_hub\utils\_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "C:\Users\whh\.conda\envs\mb\lib\site-packages\huggingface_hub\file_download.py", line 1291, in hf_hub_download
raise LocalEntryNotFoundError(
huggingface_hub.utils._errors.LocalEntryNotFoundError: Connection error, and we cannot find the requested files in the disk cache. Please try again or make sure your Internet connection is on.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\project\MockingBird\MockingBird\pre.py", line 1, in
from models.synthesizer.preprocess import create_embeddings, preprocess_dataset, create_emo
File "D:\project\MockingBird\MockingBird\models\synthesizer\preprocess.py", line 9, in
from models.synthesizer.preprocess_audio import preprocess_general, extract_emo
File "D:\project\MockingBird\MockingBird\models\synthesizer\preprocess_audio.py", line 25, in
processor = Wav2Vec2Processor.from_pretrained(model_name)
File "C:\Users\whh\.conda\envs\mb\lib\site-packages\transformers\models\wav2vec2\processing_wav2vec2.py", line 62, in from_pretrained
feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(pretrained_model_name_or_path, **kwargs)
File "C:\Users\whh\.conda\envs\mb\lib\site-packages\transformers\feature_extraction_utils.py", line 338, in from_pretrained
feature_extractor_dict, kwargs = cls.get_feature_extractor_dict(pretrained_model_name_or_path, **kwargs)
File "C:\Users\whh\.conda\envs\mb\lib\site-packages\transformers\feature_extraction_utils.py", line 438, in get_feature_extractor_dict
resolved_feature_extractor_file = cached_file(
File "C:\Users\whh\.conda\envs\mb\lib\site-packages\transformers\utils\hub.py", line 452, in cached_file
raise EnvironmentError(
OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like audeering/wav2vec2-large-robust-12-ft-emotion-msp-dim is not the path to a directory containing a file named preprocessor_config.json.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.

(mb) D:\project\MockingBird\MockingBird>

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with pre.py and models/synthesizer/preprocess_audio.py at the Wav2Vec2Processor.from_pretrained(model_name) call. Check whether the audeering/wav2vec2-large-robust-12-ft-emotion-msp-dim files, including preprocessor_config.json, can be reached or are present in the local cache. Done means the reported preprocessing command proceeds past processor loading without the connection or missing-file error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.