duckietown / challenge-aido_LF-baseline-RL-sim-pytorch

1 stars 2 forks source link

Training stalls #20

Closed marquezo closed 5 years ago

marquezo commented 5 years ago

I just cloned this repo and executed: python 4-train-ddpg-cnn-remote.py --seed 123 --max_timesteps 10000 --start_timesteps 5000

The training never ends. Something must be causing it to hang. The entire output I have is the following. I am running Ubuntu 18

python 4-train-ddpg-cnn-remote.py --seed 123 --max_timesteps 10000 --start_timesteps 5000 INFO:gym-duckietown:Using gym-duckietown version 2018.8.2-more-exposure

INFO:gym-duckietown:Registering gym environment id: Duckietown-loop_empty-v0 INFO:gym-duckietown:Registering gym environment id: Duckietown-loop_pedestrians-v0 INFO:gym-duckietown:Registering gym environment id: Duckietown-4way-v0 INFO:gym-duckietown:Registering gym environment id: Duckietown-udem1-v0 INFO:gym-duckietown:Registering gym environment id: Duckietown-loop_obstacles-v0 INFO:gym-duckietown:Registering gym environment id: Duckietown-loop_dyn_duckiebots-v0 INFO:gym-duckietown:Registering gym environment id: Duckietown-small_loop_cw-v0 INFO:gym-duckietown:Registering gym environment id: Duckietown-straight_road-v0 INFO:gym-duckietown:Registering gym environment id: Duckietown-small_loop-v0 INFO:gym-duckietown:Registering gym environment id: Duckietown-zigzag_dists-v0 DEBUG:gym-duckietown:loading map file "/home/orlandom/Documents/UdeM/A2018/Duckietown/gym-duckietown/gym_duckietown/maps/loop_empty.yaml" DEBUG:gym-duckietown:loading mesh "/home/orlandom/Documents/UdeM/A2018/Duckietown/gym-duckietown/gym_duckietown/meshes/duckiebot.obj" DEBUG:gym-duckietown:loading materials from "/home/orlandom/Documents/UdeM/A2018/Duckietown/gym-duckietown/gym_duckietown/meshes/duckiebot.mtl" DEBUG:gym-duckietown:loading texture "/home/orlandom/Documents/UdeM/A2018/Duckietown/gym-duckietown/gym_duckietown/textures/floor_1.png" DEBUG:gym-duckietown:loading texture "/home/orlandom/Documents/UdeM/A2018/Duckietown/gym-duckietown/gym_duckietown/textures/curve_left_1.png" DEBUG:gym-duckietown:loading texture "/home/orlandom/Documents/UdeM/A2018/Duckietown/gym-duckietown/gym_duckietown/textures/straight_1.png" DEBUG:gym-duckietown:loading texture "/home/orlandom/Documents/UdeM/A2018/Duckietown/gym-duckietown/gym_duckietown/textures/curve_right_1.png" INFO:gym-duckietown:Starting at [4.05833625 0. 2.17835003] 1.6292900738092628 INFO:gym-duckietown:Starting at [2.75442323 0. 3.0079666 ] 4.836049502872963 /home/orlandom/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 return f(*args, *kwds) /home/orlandom/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 return f(args, **kwds) INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [3.57449761 0. 1.00806868] 0.03283258105572982 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [3.9473256 0. 2.19364627] 4.702071320710585 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [3.94220351 0. 1.23114947] 4.6872131439193785 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [0.84497723 0. 1.12248482] 4.62469817797601 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [3.00329777 0. 0.86708317] 0.03494804900834834 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [1.72410152 0. 3.21929481] 0.031718422953232184 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [1.71140436 0. 0.7361902 ] 0.05085325578040005 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [2.65733059 0. 2.53968888] 3.7178387153297594 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [3.73122222 0. 0.98704716] 3.0333650775406795 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [2.24041155 0. 3.21590583] 0.010673476616882262 Total T: 501 Episode Num: 1 Episode T: 501 Reward: 854.509912 INFO:gym-duckietown:Starting at [3.92957951 0. 1.82962767] 1.537836504751407 Total T: 1002 Episode Num: 2 Episode T: 501 Reward: 1382.132058 INFO:gym-duckietown:Starting at [1.98981129 0. 3.48160326] 3.087478745305678 Total T: 1503 Episode Num: 3 Episode T: 501 Reward: 1760.355749 INFO:gym-duckietown:Starting at [3.11152737 0. 2.78523195] 3.0779908688264115 Total T: 2004 Episode Num: 4 Episode T: 501 Reward: 1296.902438 INFO:gym-duckietown:Starting at [1.10846549 0. 0.9455224 ] 3.3807116460575606 Total T: 2505 Episode Num: 5 Episode T: 501 Reward: 1521.741720 INFO:gym-duckietown:Starting at [0.9739517 0. 1.48369572] 1.622137421871244 Total T: 3006 Episode Num: 6 Episode T: 501 Reward: 2995.906341 INFO:gym-duckietown:Starting at [3.77203766 0. 2.39619008] 1.525312395203521 Total T: 3507 Episode Num: 7 Episode T: 501 Reward: 601.050878 INFO:gym-duckietown:Starting at [1.35529457 0. 3.24218217] 3.1554035484012104 Total T: 4008 Episode Num: 8 Episode T: 501 Reward: 3433.330698 INFO:gym-duckietown:Starting at [2.73591371 0. 0.76475867] 0.06822140602517551 Total T: 4509 Episode Num: 9 Episode T: 501 Reward: 888.804663 INFO:gym-duckietown:Starting at [1.85486764 0. 0.8407821 ] 3.1878907286576426 Total T: 5010 Episode Num: 10 Episode T: 501 Reward: 4590.987366 INFO:gym-duckietown:Starting at [0.97423346 0. 2.98356755] 4.747251513022631 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [0.77685055 0. 2.40811134] 4.765677679482927 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [1.05554768 0. 2.96542532] 4.700261875451524 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [2.2786526 0. 3.46766545] 3.109026862054668 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [4.11488735 0. 1.55011737] 1.5137391633133832 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [1.81244432 0. 3.40742735] 6.23457650856301 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [0.82609819 0. 2.07466136] 4.712615769848655 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [3.85714995 0. 2.48368925] 1.5835958666396226 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [3.82733097 0. 1.42808698] 1.6070600692221702 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [0.95518415 0. 2.34464836] 4.7652211493162335 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [1.8123354 0. 3.16936997] 3.1072592225997586 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. Total T: 5336 Episode Num: 11 Episode T: 326 Reward: 1286.927675 INFO:gym-duckietown:Starting at [0.9269024 0. 3.29121142] 5.269067776758451 Total T: 5837 Episode Num: 12 Episode T: 501 Reward: 1216.250194 INFO:gym-duckietown:Starting at [1.02009902 0. 3.30414005] 5.702028085641966 Total T: 6338 Episode Num: 13 Episode T: 501 Reward: 1876.277064 INFO:gym-duckietown:Starting at [2.88027573 0. 3.47187302] 0.7529683401958301 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. Total T: 6403 Episode Num: 14 Episode T: 65 Reward: 170.812433 INFO:gym-duckietown:Starting at [1.88699274 0. 1.00420329] 3.156457756905746 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. Total T: 6752 Episode Num: 15 Episode T: 349 Reward: 496.003454 INFO:gym-duckietown:Starting at [1.00865648 0. 1.14480757] 4.618695324933641 Total T: 7253 Episode Num: 16 Episode T: 501 Reward: 2068.432293 INFO:gym-duckietown:Starting at [0.81555968 0. 0.73275315] 3.843027135558196 Total T: 7754 Episode Num: 17 Episode T: 501 Reward: 1365.010863 INFO:gym-duckietown:Starting at [4.16428826 0. 1.84173787] 4.657534903640909 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. Total T: 7771 Episode Num: 18 Episode T: 17 Reward: 2.923855 INFO:gym-duckietown:Starting at [1.03581628 0. 3.31259733] 5.93951143913846 Total T: 8272 Episode Num: 19 Episode T: 501 Reward: 1351.269410 INFO:gym-duckietown:Starting at [1.17925152 0. 3.42961986] 6.214955314959361 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. Total T: 8738 Episode Num: 20 Episode T: 466 Reward: 1267.563638 INFO:gym-duckietown:Starting at [1.58334408 0. 0.78432014] 0.05965770610961421 Total T: 9239 Episode Num: 21 Episode T: 501 Reward: 2492.996383 INFO:gym-duckietown:Starting at [2.80138347 0. 3.52956371] 0.5593241756506587 Total T: 9740 Episode Num: 22 Episode T: 501 Reward: 1503.948696 INFO:gym-duckietown:Starting at [2.60648919 0. 3.36890092] 0.23922523961624065 INFO:gym-duckietown:Starting at [2.68231812 0. 0.93472169] 3.1092806942693443 INFO:gym-duckietown:Stopping the simulator because we are at an invalid pose. INFO:gym-duckietown:Starting at [4.0507911 0. 1.92284526] 4.697721028254222

marquezo commented 5 years ago

Upon killing the process, I get the following.

^CTraceback (most recent call last): File "4-train-ddpg-cnn-remote.py", line 142, in evaluations.append(evaluate_policy(env, policy)) File "/home/orlandom/Documents/UdeM/A2018/Duckietown/gym-duckietown-agent/RL-baseline/duckietown_rl/utils.py", line 67, in evaluatepolicy obs, reward, done, = env.step(action) File "/home/orlandom/anaconda3/lib/python3.6/site-packages/gym/core.py", line 321, in step observation, reward, done, info = self.env.step(action) File "/home/orlandom/anaconda3/lib/python3.6/site-packages/gym/core.py", line 332, in step return self.env.step(action) File "/home/orlandom/anaconda3/lib/python3.6/site-packages/gym/core.py", line 304, in step observation, reward, done, info = self.env.step(action) File "/home/orlandom/anaconda3/lib/python3.6/site-packages/gym/core.py", line 304, in step observation, reward, done, info = self.env.step(action) File "/home/orlandom/anaconda3/lib/python3.6/site-packages/gym/core.py", line 304, in step observation, reward, done, info = self.env.step(action) File "/home/orlandom/Documents/UdeM/A2018/Duckietown/gym-duckietown/gym_duckietown/simulator.py", line 1190, in step obs = self.render_obs() File "/home/orlandom/Documents/UdeM/A2018/Duckietown/gym-duckietown/gym_duckietown/simulator.py", line 1434, in render_obs observation = self.camera_model.distort(observation) File "/home/orlandom/Documents/UdeM/A2018/Duckietown/gym-duckietown/gym_duckietown/distortion.py", line 66, in distort return cv2.remap(observation, self.rmapx, self.rmapy, interpolation=cv2.INTER_NEAREST) KeyboardInterrupt

bhairavmehta95 commented 5 years ago

So are you running this on a local machine? If you don't have a strong GPU, the default settings / parameters may be too much for your training. Try to reduce the memory buffer size, or the number of gradient steps per update.

bhairavmehta95 commented 5 years ago

I'll be closing this for now - cant reproduce so have to believe it's a local machine issue.