Comments (3)
Hello,
if you want to parallelize gradient steps, you need to have a look at Stable-Baselines-Team/stable-baselines3-contrib#11 and linked issues.
if you want to parallelize data collection, you need to use VecEnv
.
I'm also not sure why you have some TF code in there...
from stable-baselines3.
Hi @araffin, thanks for your response.
I may have not been quite clear about what I wanted to achieve.
I am parallelizing external to the model instance and not within it. That is, with each different XML file, I run a train_ppo.py instance per thread. Depending on the XML file count, the number of parallel processes increases, and thus gym envs. are created and PPO models are trained in parallel. It is here I face the problem.
I notice that the gradient steps are somehow taking longer and longer to process with the increase in the thread count (i.e. increase in independent gym env count), which normally shouldn't be the case because each thread must be treated independently and I should have models trained independently. (Please notice the time_elapsed in seconds for just 4000 env. steps in the attached screenshot)
Hence your suggestions about parallel gradient steps and data collection through Stable-Baselines-Team/stable-baselines3-contrib/issues/11 and VecEnv, though useful, aren't addressing my problem, because I still have num_cpu=1 even in VecEnv.
Hope this clarifies things further. Please let me know how I may go about this problem, thanks.
And yes, the TF code is a blunder please ignore it.
from stable-baselines3.
Related Issues (20)
- Discrepancy between Observations Sampled from Gym Env and Replay Buffer HOT 3
- [Bug]: Load Trained Policy HOT 8
- [Bug]: evaluate_policy called multiple times vor vectorized environments HOT 5
- Handing mission space in Babyai env HOT 6
- ValueError: could not broadcast input array from shape (23,) into shape (27,) HOT 2
- SAC model not properly saved HOT 5
- [Question] Pong environment with A2C not learning with example code HOT 1
- [Question] The error about DQN--ep_len_mean&ep_rew_mean output HOT 1
- [Question] How to access to rollout (logger) data in callback HOT 2
- [Feature Request] Allow users to define gradient steps as a fraction of rollout time-steps HOT 4
- SubprocVecEnv Sets Out-of-Range Seeds for My Environments (ScenarioNet Enviroment) HOT 8
- [Question] A error while using SAC and DDPG HOT 1
- [Question] LSTM and SAC - Am I understanding the docs correctly? HOT 3
- [Question] Why torch model in c++ got totally different output from python HOT 4
- [Bug]: Manually setting net_arch=None causes crash when loading model HOT 3
- [Question] Why resample SDE noise matrices in PPO optimzation? HOT 4
- [Question] SAC, a torch model becomes a bool somehow HOT 1
- Setting up seed in Custom Gym environment HOT 5
- What does the output of model.learn mean? HOT 3
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 stable-baselines3.