baselines icon indicating copy to clipboard operation
baselines copied to clipboard

Can not execute PPO and TRPO

Open shijcnju opened this issue 9 years ago • 8 comments

Can PPO or TRPO execute? I tried my best but failed. Thank you~

shijcnju avatar Jul 25 '17 13:07 shijcnju

I think you should use the source directly instead of using the pip install command

jiamings avatar Jul 25 '17 18:07 jiamings

I used pip install and it worked for me. @shijcnju, I replied to you in the another issue. If you post an error log our advices can become more precise.

ViktorM avatar Jul 26 '17 02:07 ViktorM

I met this problem if I used pip install @ViktorM

Traceback (most recent call last): File "run_atari.py", line 5, in from baselines import bench ImportError: cannot import name

shijcnju avatar Jul 26 '17 03:07 shijcnju

Now I can run trpo and ppo from source code, but I'm confused what 'Monitor' do. env = bench.Monitor(env, osp.join(logger.get_dir(), "%i.monitor.json" % rank)) It seems that trpo and ppo can run without this sentence

shijcnju avatar Jul 26 '17 04:07 shijcnju

@shijcnju I had the error with import bench, but solved it just by adding baselines to pythonpath if I remember correctly. The pip install worked quite well for me and it was the smallest of my issues. for example run_mujoco.py can't be run as Gym hasn't moved yet to the latest mujoco 1.50 version. I've created a Box2d run_bipedal_walker.py script for training bipedal walker and it looks like, according to the reward it behaves and converge well - I've got a reward 210 after 1e6 steps. After more steps it'll be fully solved. But I still haven't managed to find how to enable rendering or get the results saved and loaded.

ViktorM avatar Jul 26 '17 23:07 ViktorM

no bench class or def bench。

File "run_atari.py", line 11, in from baselines import bench ImportError: cannot import name 'bench'

zdx3578 avatar Jul 29 '17 02:07 zdx3578

I also had the bench import issue and resolved it after adding it to pythonpath: export PYTHONPATH="${PYTHONPATH}:/home/....../baselines"

silverjoda avatar Aug 17 '17 09:08 silverjoda

I think I fixed these issues in a recent commit.

joschu avatar Aug 28 '17 05:08 joschu