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

测试使用命令bash scripts/generate_text.sh /path/to/CPM example.txt报错 #22

Closed
zhenhao-huang opened this issue Dec 5, 2020 · 5 comments

Comments

@zhenhao-huang
Copy link

zhenhao-huang commented Dec 5, 2020

Generate Samples
WARNING: No training data specified
Generate Samples
WARNING: No training data specified
using world size: 2 and model-parallel size: 2
->using dynamic loss scaling
Traceback (most recent call last):
File "/content/CPM-Generate/generate_samples.py", line 379, in
main()
File "/content/CPM-Generate/generate_samples.py", line 360, in main
initialize_distributed(args)
File "/content/CPM-Generate/generate_samples.py", line 96, in initialize_distributed
device = args.rank % torch.cuda.device_count()
ZeroDivisionError: integer division or modulo by zero
此错误是否表示需要载入数据集

@zzy14
Copy link
Contributor

zzy14 commented Dec 7, 2020

device = args.rank % torch.cuda.device_count()应该是说你没有指定cuda的显卡。

@zhenhao-huang
Copy link
Author

device = args.rank % torch.cuda.device_count()应该是说你没有指定cuda的显卡。

怎么指定cuda显卡

@zzy14
Copy link
Contributor

zzy14 commented Dec 10, 2020

在运行命令前加上环境变量 CUDA_VISIBLE_DEVICES=xxx xxx是需要指定卡的标号

@zhenhao-huang
Copy link
Author

在运行命令前加上环境变量 CUDA_VISIBLE_DEVICES=xxx xxx是需要指定卡的标号

明白了,这是单卡的时候会报错,双卡就不会,但是似乎单双卡都会这样的警告
Generate Samples
WARNING: No training data specified
Generate Samples
WARNING: No training data specified
是需要加载数据吗

@zhenhao-huang
Copy link
Author

生成不需要加载数据,微调、训练则需要

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

No branches or pull requests

2 participants