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

SubprocVecEnv in_series #815

Closed
UntotaufUrlaub opened this issue Mar 10, 2022 · 5 comments
Closed

SubprocVecEnv in_series #815

UntotaufUrlaub opened this issue Mar 10, 2022 · 5 comments
Labels
question Further information is requested

Comments

@UntotaufUrlaub
Copy link

UntotaufUrlaub commented Mar 10, 2022

Question

Hi,

as far as I see sb3.SubprocVecEnv doesn't have the in_series parameter which baslines SubprocVecEnv has.
Is there any way in sb3 to achieve this behavior? Or why should one not use it?

kind regards

@UntotaufUrlaub UntotaufUrlaub added the question Further information is requested label Mar 10, 2022
@UntotaufUrlaub UntotaufUrlaub changed the title [Question] question title SubprocVecEnv in_series Mar 10, 2022
@Miffyli
Copy link
Collaborator

Miffyli commented Mar 10, 2022

DummyVecEnv is exactly this :). Other than that is functions just like SubProcVecEnv (the envs are also not in separate processes).

@UntotaufUrlaub
Copy link
Author

UntotaufUrlaub commented Mar 10, 2022

First thanks for your answer :)

But in_series of baselines allows to combine DummyVecEnv and SubprocVecEnv behaviour.
For example you can use 6 threads where each has 10 envs. So you can have 60 parallel envs.
60 is to much to have a thread for each (at least for my hardware) but you can still use the benefits of some multiprocessing.
Discussed here (in 2018)

@Miffyli
Copy link
Collaborator

Miffyli commented Mar 10, 2022

Ah, no, that is not supported in SB3. I think we had a discussion on this in either SB2 or SB3 in issues, but ultimately nobody made an implementation of this. If you seek high-performance libraries that support such things, try sample-factory, for example (not as simple but high performance).

@UntotaufUrlaub
Copy link
Author

Ah I see. What a pity. But thanks for the information and the hint :)

@Miffyli Miffyli closed this as completed Mar 10, 2022
@araffin
Copy link
Member

araffin commented Mar 11, 2022

You may have a look at https://github.com/ingambe/RayEnvWrapper (I didn't test that one but looks interesting) and hill-a/stable-baselines#390 (comment)

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

No branches or pull requests

3 participants