-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
AttributeError: 'ParallelEnv' object has no attribute '_device_id' #46377
Comments
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档、常见问题、历史Issue、AI社区来寻求解答。祝您生活愉快~ Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the API,FAQ,Github Issue and AI community to get the answer.Have a nice day! |
@LucasMartinuzzo Hi, I've received your issue. And I require more information about the version of PaddlePaddle and PaddleOCR. |
@LucasMartinuzzo When you tried the given demo, did you make sure the installed PaddlePaddle is supported with GPU? Please check it by the following codes. import paddle
paddle.utils.run_check() If it gives the results like:
meaning you has installed the right version of paddlepaddle-gpu. |
Hi, i ran the command and the output is:
I didn't know about this paddlepaddle-gpu, so I installed now and the output is:
I executed the program again and it stopped giving this error. Thank you. |
Hi Lucas, I have the same issue, did you resolve it? Sheng |
Yes, installing paddlepaddle-gpu worked for me. |
Hi Lucas, |
I uninstalled paddlepaddle-gpu==2.4 and installed paddlepaddle-gpu==2.3.2. |
How to fix it with |
To use the CPU version of |
Installing paddlepaddle-gpu==2.3.2 worked for me |
Hi, I have the same issue. I have ran the command: conda install paddlepaddle-gpu==2.3.2 cudatoolkit=11.6 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge but that did not help.
I've installed CUDA Toolkit 11.6 as well through NVidia... |
For me, I had to try installing the appropriate "paddlepaddle-gpu" package from the link: PaddlePaddle So I tried running the command below (but got a network error): So I had to download the wheels I needed and ran the command: This error seems to be related to No module named 'paddle.io' |
bug描述 Describe the Bug
I'm trying to train the recognition model using custom data, but i'm getting some error. This is how i call it:
CUDA_VISIBLE_DEVICES=0 python3 -m paddle.distributed.launch --log_dir=./debug/ --selected_gpus='0' tools/train.py -c configs/rec/prices/rec_price_1.yml -o Global.pretrained_model=en_PP-OCRv3_rec_train/best_accuracy
(I also tried with more than one GPU)
I'm getting the error:
Traceback (most recent call last):
File "/mnt/batch/tasks/shared/LS_root/mounts/clusters/computerlucasgpu-nc24/code/Users/lucas.martinuzzobatista-ext/OCR/PaddleOCR/tools/train.py", line 199, in
config, device, logger, vdl_writer = program.preprocess(is_train=True)
File "/mnt/batch/tasks/shared/LS_root/mounts/clusters/computerlucasgpu-nc24/code/Users/lucas.martinuzzobatista-ext/OCR/PaddleOCR/tools/program.py", line 652, in preprocess
device = 'gpu:{}'.format(dist.ParallelEnv()
File "/anaconda/envs/ocrTests/lib/python3.9/site-packages/paddle/fluid/dygraph/parallel.py", line 200, in device_id
return self._device_id
AttributeError: 'ParallelEnv' object has no attribute '_device_id'
I also tried the snipped give on documentation:
And it gives the same error:
Traceback (most recent call last):
File "", line 1, in
File "/anaconda/envs/ocrTests/lib/python3.9/site-packages/paddle/fluid/dygraph/parallel.py", line 200, in device_id
return self._device_id
AttributeError: 'ParallelEnv' object has no attribute '_device_id'
其他补充信息 Additional Supplementary Information
No response
The text was updated successfully, but these errors were encountered: