deepspeed_wenet debug记录

[2023-06-12 15:30:33,210] [WARNING] [runner.py:191:fetch_hostfile] Unable to find hostfile, will proceed with training with local resources only.
Detected CUDA_VISIBLE_DEVICES=0,1 but ignoring it because one or several of --include/--exclude/--num_gpus/--num_nodes cl args were used. If you want to use CUDA_VISIBLE_DEVICES don't pass any of these arguments to deepspeed.
Traceback (most recent call last):
  File "/home/environment/hnzhang/Anaconda3/envs/d_spd/bin/deepspeed", line 6, in <module>
    main()
  File "/home/environment/hnzhang/Anaconda3/envs/d_spd/lib/python3.9/site-packages/deepspeed/launcher/runner.py", line 407, in main
    raise RuntimeError("Unable to proceed, no GPU resources available")
RuntimeError: Unable to proceed, no GPU resources available
do model average and final checkpoint is exp/conformer_6_1/avg_5.pt
Namespace(dst_model='exp/conformer_6_1/avg_5.pt', src_path='exp/conformer_6_1', val_best=True, num=5, min_epoch=0, max_epoch=65536)
Traceback (most recent call last):
  File "/home/work_nfs6/hnzhang/wenet_deepspeed/wenet_main/examples/aishell/s0/wenet/bin/average_model.py", line 101, in <module>
    main()
  File "/home/work_nfs6/hnzhang/wenet_deepspeed/wenet_main/examples/aishell/s0/wenet/bin/average_model.py", line 66, in main
    sort_idx = np.argsort(val_scores[:, -1])
...

上方为服务器的报错。

根据warning和error,首先观察文件/home/environment/hnzhang/Anaconda3/envs/d_spd/bin/deepspeed。它很简单。

 下一个报错是/home/environment/hnzhang/Anaconda3/envs/d_spd/lib/python3.9/site-packages/deepspeed/launcher/runner.py", line 407, in main,接下来查看对应文件。

显然raise  RuntimeError("Unable to proceed...")的原因是device_count为0,接下来搞清楚为什么它是0。

显然是因为get_accelerator.device_count()为0。

在查询相关的另一个问题时,一篇详尽的回答提示,get_accelerator.device_count()可能就是torch.cuda.device_count()。该函数应当返回机器上可用的GPU数量。我用的机子上有四张卡。

但是发现:

这应该就是问题了。继续查为什么和怎么办。这篇文章帮了大忙。

(188条消息) 配置深度学习项目环境,Linux服务器torch.cuda.is_available()返回False_torch返回cuda_info825的博客-CSDN博客

 应该是cuda版本问题。使用nvidia-smi命令查看驱动版本。是455.23.04。

 根据下表,用anaconda新开一个虚拟环境,选择cuda toolkit 11.0版本安装。

 临时换源的安装命令:

conda install cudatoolkit=11.0 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/

再根据下表选择对应版本的pytorch安装。

 

 接下来只需要根据其他错误信息,安装缺失的python包,就完成了debug。使用deepspeed开始了单机模型训练。

pip安装时,临时换源的命令如下:

pip install deepspeed==0.9.2 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

 即使碰到一大堆陌生的错误信息也不用太害怕。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值