Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPU版找不到文件model_blade.torchscript #2201

Open
Jotree2012 opened this issue Nov 8, 2024 · 3 comments
Open

GPU版找不到文件model_blade.torchscript #2201

Jotree2012 opened this issue Nov 8, 2024 · 3 comments
Labels
question Further information is requested

Comments

@Jotree2012
Copy link

Notice: In order to resolve issues more efficiently, please raise issue following the template.
(注意:为了更加高效率解决您遇到的问题,请按照模板提问,补充细节)

❓ Questions and Help

Before asking:

  1. search the issues.
  2. search the docs.

What is your question?

运行WSL-Ubuntu-Docker GPU版 提示这个模型里没有文件 model_blade.torchscript

按照官网https://github.com/modelscope/FunASR/blob/main/runtime/docs/SDK_advanced_guide_offline_gpu_zh.md
到最后一步
nohup bash run_server.sh
--download-model-dir /workspace/models
--vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx
--model-dir damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch
--punc-dir damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx
--lm-dir damo/speech_ngram_lm_zh-cn-ai-wesp-fst
--itn-dir thuduj12/fst_itn_zh
--hotword /workspace/models/hotwords.txt > log.txt 2>&1 &

执行后,查看log.txt
tail -f log.txt
If you want to use ffmpeg backend to load audio, please install it by:
sudo apt install ffmpeg # ubuntu
# brew install ffmpeg # mac
transformer is not installed, please install it if you want to use related modules
model is not exist, begin to export /workspace/models/damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch/model_blade.torchscript
funasr version: 1.1.8.
Check update of funasr, and it would cost few times. You may disable it by set disable_update=True in AutoModel
New version is available: 1.1.14.
Please use the command "pip install -U funasr" to upgrade.
Downloading: 100%|██████████| 6.00k/6.00k [00:00<00:00, 18.3kB/s]
Downloading: 100%|██████████| 10.9k/10.9k [00:00<00:00, 38.9kB/s]
Downloading: 100%|██████████| 408k/408k [00:00<00:00, 897kB/s]
Downloading: 100%|██████████| 2.83k/2.83k [00:00<00:00, 9.47kB/s]
Downloading: 100%|██████████| 693/693 [00:00<00:00, 2.22kB/s]
Downloading: 100%|██████████| 859M/859M [01:21<00:00, 11.0MB/s]
Downloading: 100%|██████████| 19.2k/19.2k [00:00<00:00, 55.9kB/s]
Downloading: 100%|██████████| 7.90M/7.90M [00:01<00:00, 6.52MB/s]
Downloading: 100%|██████████| 48.7k/48.7k [00:00<00:00, 130kB/s]
Downloading: 100%|██████████| 91.5k/91.5k [00:00<00:00, 196kB/s]
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/workspace/FunASR/funasr/download/runtime_sdk_download_tool.py", line 58, in
main()
File "/workspace/FunASR/funasr/download/runtime_sdk_download_tool.py", line 51, in main
export_model.export(
File "/workspace/FunASR/funasr/auto/auto_model.py", line 662, in export
export_dir = export_utils.export(model=model, data_in=data_list, **kwargs)
File "/workspace/FunASR/funasr/utils/export_utils.py", line 31, in export
assert (
AssertionError: Currently bladedisc optimization for FunASR only supports GPU
I20241108 06:19:07.329227 161 funasr-wss-server.cpp:308] Failed to download model from modelscope. If you set local asr model path, you can ignore the errors.
E20241108 06:19:07.330305 161 funasr-wss-server.cpp:312] /workspace/models/damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch/model_blade.torchscript do not exists.

What have you tried?

有damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch模型,想要手动重新下载,发现ModelScope对应模型文件夹下并没有文件model_blade.torchscript

What's your environment?

WSL-Ubuntu-Docker
WSL2.0
Ubuntu22.04
Docker version 24.0.7, build 24.0.7-0ubuntu2~22.04.1

@Jotree2012 Jotree2012 added the question Further information is requested label Nov 8, 2024
@Jotree2012
Copy link
Author

删除/workspace/models/damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch后,
重新运行命令
日志如下:报错不能下载模型
root@88336fc22380:/workspace/FunASR/runtime# tail -f log.txt
Key Conformer already exists in model_classes, re-register
Key Linear already exists in adaptor_classes, re-register
Key TransformerDecoder already exists in decoder_classes, re-register
Key LightweightConvolutionTransformerDecoder already exists in decoder_classes, re-register
Key LightweightConvolution2DTransformerDecoder already exists in decoder_classes, re-register
Key DynamicConvolutionTransformerDecoder already exists in decoder_classes, re-register
Key DynamicConvolution2DTransformerDecoder already exists in decoder_classes, re-register
transformer is not installed, please install it if you want to use related modules
I20241108 06:46:43.440191 1214 funasr-wss-server.cpp:235] Set vad-dir : /workspace/models/damo/speech_fsmn_vad_zh-cn-16k-common-onnx
I20241108 06:46:43.440222 1214 funasr-wss-server.cpp:289] Download model: damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch from modelscope:
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details
import(pkg_name)
File "/usr/local/lib/python3.8/dist-packages/funasr/init.py", line 37, in
import_submodules(name)
File "/usr/local/lib/python3.8/dist-packages/funasr/init.py", line 33, in import_submodules
results.update(import_submodules(name))
File "/usr/local/lib/python3.8/dist-packages/funasr/init.py", line 25, in import_submodules
for loader, name, is_pkg in pkgutil.walk_packages(package.path, package.name + "."):
File "/usr/lib/python3.8/pkgutil.py", line 92, in walk_packages
import(info.name)
File "/usr/local/lib/python3.8/dist-packages/funasr/models/eres2net/init.py", line 1, in
from .eres2net import ERes2Net
File "/usr/local/lib/python3.8/dist-packages/funasr/models/eres2net/eres2net.py", line 14, in
import torch
File "/usr/local/lib/python3.8/dist-packages/torch/init.py", line 233, in
for name in dir(_C):
NameError: name '_C' is not defined
I20241108 06:46:44.063077 1214 funasr-wss-server.cpp:308] Failed to download model from modelscope. If you set local asr model path, you can ignore the errors.
E20241108 06:46:44.063591 1214 funasr-wss-server.cpp:312] /workspace/models/damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch/model_blade.torchscript do not exists.

@Jotree2012
Copy link
Author

是版本太高了?
root@6e761e19fa76:/workspace/FunASR/runtime# nvidia-smi
Fri Nov 8 07:54:45 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.51.01 Driver Version: 565.90 CUDA Version: 12.7 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4090 D On | 00000000:01:00.0 On | Off |
| 0% 49C P8 12W / 425W | 1289MiB / 24564MiB | 6% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 33 G /Xwayland N/A |

@youqugit
Copy link

同样的问题

  1. 自动下载找不到model_blade.torchscript
  2. 手动下载好,不会执行转换torchscript动作

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants