Comments (10)
I failed to run PPO, can you tell me how to do it?
Thank you~
from baselines.
@shijcnju sorry for delay with reply, traveling at the moment. If you previously had no problem to run DQN. It's pretty straightforward. The only required change if you plan to run it on PC or laptop with 1 CPU- to set num_cpu=1 in:
def main():
train('PongNoFrameskip-v4', num_timesteps=40e6, seed=0, num_cpu=8)
Except this change PPO for me was running out of the box, except reward growth.
from baselines.
Also you should pip install mpi4py first and on Windows a few more actions were required to make mpi4py work.
from baselines.
If you set num_cpu = 4 and run run_atari.py again, you should observe around 17.0 mean reward in about 2k iterations.
However if you are working in Anaconda environment and have installed mpi4py via pip or conda install, this probably will report some errors like 'detected that one or more processes exited with non-zero status'. In this case, you should remove mpi4y and reinstall from source https://bitbucket.org/mpi4py/mpi4py instead.
from baselines.
Thanks @iamzoumao for the advice. With 4 num_cpu I see a bit different errors:
File "run_atari2.py", line 54, in <module>
main()
File "run_atari2.py", line 51, in main
train('PongNoFrameskip-v4', num_timesteps=40e6, seed=0, num_cpu=4)
File "run_atari2.py", line 20, in train
whoami = mpi_fork(num_cpu)
File "D:\baselines\baselines\common\mpi_fork.py", line 20, in mpi_fork
subprocess.check_call(args, env=env)
File "C:\Users\Viktor\Anaconda3\envs\deep-rl\lib\subprocess.py", line 576, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Users\Viktor\Anaconda3\envs\deep-rl\lib\subprocess.py", line 557, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Users\Viktor\Anaconda3\envs\deep-rl\lib\subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "C:\Users\Viktor\Anaconda3\envs\deep-rl\lib\subprocess.py", line 1224, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
But will try reinstalling from source in any way, thanks.
from baselines.
Ran into the same problem as @ViktorM. Tried installing mpi4py from source, but got the same error.
from baselines.
Ok I got it to work:
First, install both the mpi run time and mpi SDK from
https://www.microsoft.com/en-us/download/details.aspx?id=55494
Then rename/copy
C:\Program Files\Microsoft MPI\Bin\mpiexec.exe
to
C:\Program Files\Microsoft MPI\Bin\mpirun.exe
or need to modify
baselines\common\mpi_fork.py
to call mpiexec instead, if running on Windows
from baselines.
Using ubuntu 16.04, and running these from a conda environment. Unable to run PPO or TRPO as I get the error that @iamzoumao stated. Was unable to make mpi4py from source. Any workaround for this?
from baselines.
@KeirSimmons for me on Ubuntu 16.04 just conda install mpi4py worked well.
from baselines.
We don't officially support Windows. It's great if it works, but we don't have Windows here anywhere. Please post a PR if you're able to fix a specific Windows problem.
from baselines.
Related Issues (20)
- baselines/logger.py: Potentially insecure use of a temporary file/directory
- ERROR: Extras after version '>=0.9.1[all]'. HOT 1
- ValueError: too many values to unpack (expected 2) HOT 2
- 'OPENAI_LOGDIR' is not recognized as an internal or external command, operable program or batch file. HOT 1
- Possible bug in gradient clipping of deepq_learner (tf2 branch) HOT 1
- The use of close() in shmem_vec_env
- Matplotlib required for pytests
- Hello, I'm a user from China, and I want to register OpenAI, but I can't. What's the best solution
- Each mpi worker holds an individual replay buffer in HER?
- Running on MacOS Monterey, w/ M1 Pro Chip HOT 1
- [Question] Compatibilities wrappers for Atari games and gymnasium
- PPO 2 ratio implementation
- In baselines/common/distributions.py, CategoricalPd.Sample seems have a bug.
- I recommend downgrade tensorflow_v2->v1
- how to reset target when pickup objects in HER
- Abusing access to sensitive content HOT 1
- Question on VecNormalize wrapper "training" parameter..
- tf_util
- It gets the following error when I run pytest
- Test
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 baselines.