-
Notifications
You must be signed in to change notification settings - Fork 799
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
推理的时候CPU占用很高,越到后面越高,而且不下来,导致推不动 #2140
Comments
|
|
同样问题,CPU一直保持100% |
我到后面都到4000%多了 |
我用那个caps包的,现在写了个ps脚本每5个长语音(10分钟1个)就重启一遍client,内存就不会爆。。以后调调gpu版本的看看会不会有类似行为。。 |
多线程运行的么? |
|
同样的问题刚开始还好好的, 几天后CPU飙到100%, 一直下不来, 识别率变的很低, 都是错乱的. 得重启服务才行. |
What is your question?
Code
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
from argparse import ArgumentParser
import os
import soundfile as sf
import time
import numpy as np
import torchaudio
import torch
from funasr import AutoModel
def main():
save_dir = "/mnt/hdd2/ximalaya_16k_spk"
scp_dir = './wav.scp'
if not os.path.exists(save_dir):
os.mkdir(save_dir)
parser = ArgumentParser()
parser.add_argument("-g", "--gpu_index", type=int, help="gpu index")
args = parser.parse_args()
gpu_id = args.gpu_index
with open(scp_dir, 'r') as f:
lines = f.readlines()
avg_file_num = len(lines)//8
process_files = lines[gpu_id*avg_file_num:(gpu_id+1)*avg_file_num]
if name == "main":
main()
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
93612 zhengxi+ 20 0 49.856g 5.562g 0.979g R 5705 2.2 18:12.87 python
78305 zhengxi+ 20 0 44064 5404 3532 R 21.1 0.0 0:53.40 top
56160 zhengxi+ 20 0 11.381g 77364 43004 S 5.3 0.0 0:58.93 node
1 root 20 0 225400 7760 5280 S 0.0 0.0 0:14.52 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:01.67 kthreadd
What have you tried?
What's your environment?
The text was updated successfully, but these errors were encountered: