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

Opinions on running envpool on a dedicated simulator server with e.g. REST API #300

Open
harpone opened this issue Apr 22, 2024 · 3 comments
Assignees

Comments

@harpone
Copy link

harpone commented Apr 22, 2024

Maximizing GPU utilization is usually pretty hard in RL, even with parallel environments, so I'm thinking of running a parallel simulator on a separate CPU only server with max possible number of CPUs and do the actual training on a GPU node (within same placement group + all possible networking optimizations) in whatever cloud.

Could this work or is the extra network latency too much to make this feasible?

@Trinkle23897
Copy link
Collaborator

In that case you should use python asyncio

@harpone
Copy link
Author

harpone commented Apr 23, 2024

In that case you should use python asyncio

yeah, maybe, but I'm more concerned about the actual feasibility in terms of latency etc. I would imagine this would be more common practice if it's feasible, but haven't been able to find any references...

@mavenlin
Copy link
Member

In that case you should use python asyncio

yeah, maybe, but I'm more concerned about the actual feasibility in terms of latency etc. I would imagine this would be more common practice if it's feasible, but haven't been able to find any references...

@harpone I believe this is feasible, we have a customized game implementation based on GRPC internally. But the code written at that time is no longer compatible with the current public version of envpool. And also it is async API only.

The basic idea is to initiate a GRPC server at the GPU server, and many GRPC clients at CPU cluster. The GRPC server asynchronously writes the StateBufferQueue and sends out the actions.

I can provide some help if you need this functionality and would like to implement on top of envpool.

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

3 participants