Comments (8)
The file demo/simple_rl/ppo_train.py is in DI-drive repo
from di-engine.
You can refer to this demo and add DistContext
in your program
from di-engine.
Thanks for your suggestion. But I add DistContext and get the following error:
WARNING:root:If you want to use numba to speed up segment tree, please install numba first
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "imgppo_train.py", line 189, in
with DistContext():
File "/home/qhzhang/code/DI-engine/ding/utils/pytorch_ddp_dist_helper.py", line 114, in enter
dist_init()
File "/home/qhzhang/code/DI-engine/ding/utils/pytorch_ddp_dist_helper.py", line 81, in dist_init
raise RuntimeError("please indicate rank explicitly in dist_init method")
RuntimeError: please indicate rank explicitly in dist_init method
from di-engine.
Are you run multi-gpu program in your own machine? And I guess you should prepare related environment variables here.
We test this parts in slurm before so it would be a bit inconvenient in local machine. And you can add your own advice for multi-gpu training in local machine.
from di-engine.
I am running multi-gpu program in my own machine so your code based on slurm environment does not work.
I have gone through the relevant code about multi-gpu part. I think using torch.distributed.launch
may help user to use your multi-gpu code in local machine.
But another problem for me is that I am actually using DI-drive and one di-drive program will lauch several (like 8) carla clients. When using torch.distributed.launch
, the carla clients will be launched multiple times (like 8*N, the N is gpu num).
So I find a quick fix using torch.DataParallel
to do multi-gpu training without your API.
from di-engine.
OK, we will support torch.DataParallel
in next version, for some cases like you encountered. And you can pay attention to roadmap for further update.
from di-engine.
We have this same error today when running on a single machine with 2 GPUs.
raise RuntimeError("please indicate rank explicitly in dist_init method")
from di-engine.
Hi, @PaParaZz1
I have the same error, can you provide a demo of how to use multi-GPU in the custom environment?
Thanks
from di-engine.
Related Issues (20)
- 混合动作空间环境,PPO使用gae_estimator报错 HOT 3
- 如何获取每个episode的reward值 HOT 1
- TD3应用混合动作空间报错,AssertionError HOT 1
- how to get the ckpt file? HOT 2
- get "TypeError: __init__() got an unexpected keyword argument 'agent_obs_shape'" when running " python3 -u smac_5m6m_masac_config.py" HOT 2
- question for SMAC HOT 3
- docker内运行lunarlander_dqn_deploy失败 HOT 6
- cannot run GTrXL demo since v0.5.0 HOT 1
- BrokenPipeError: [WinError 232] 管道正在被关闭 has occurred, when running MARL algorithm QMIX in pettingzoo
- bug when running MARL algorithm Qmix in pettingzoo HOT 3
- gym_anytrading : could not broadcast input array from shape (62,) into shape (20,3) Please help!! HOT 3
- 马里奥代码咨询 HOT 1
- No example for Trading Environments HOT 1
- KeyError: 'obs_shape' HOT 2
- How to introduce other optimizers into DI-engine? HOT 2
- RuntimeError: mat1 and mat2 shapes cannot be multiplied (4x138 and 64x138) HOT 3
- How to define close function in custom environment HOT 3
- How to initialize semantic model in subprocess mode HOT 2
- About Replicating the PPO Performance in the Hopper-V3 Environment HOT 3
- Unexpected increase in memory overhead and Multi-GPU guidance in custom environments HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from di-engine.