Skip to content

Commit

Permalink
Merge pull request #153 from zuoxingdong/add_ddpg2
Browse files Browse the repository at this point in the history
update VPG
  • Loading branch information
zuoxingdong committed May 3, 2019
2 parents b29c154 + 7228286 commit bd32d9e
Show file tree
Hide file tree
Showing 524 changed files with 20 additions and 16 deletions.
7 changes: 4 additions & 3 deletions baselines/vpg/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{'cuda': True,
'log.dir': 'logs/default',
'log.freq': 10,
'checkpoint.freq': 50,
'checkpoint.num': 3,

'env.id': Grid(['HalfCheetah-v3', 'Hopper-v3', 'Walker2d-v3', 'Swimmer-v3']),
'env.standardize_obs': True,
Expand Down Expand Up @@ -81,16 +81,17 @@ def run(config, seed, device):
runner = EpisodeRunner(reset_on_call=False)
engine = Engine(config, agent=agent, env=env, runner=runner)
train_logs = []
checkpoint_count = 0
for i in count():
if agent.total_timestep >= config['train.timestep']:
break
train_logger = engine.train(i)
train_logs.append(train_logger.logs)
if i == 0 or (i+1) % config['log.freq'] == 0:
train_logger.dump(keys=None, index=0, indent=0, border='-'*50)
if i == 0 or (i+1) % config['checkpoint.freq'] == 0:
if agent.total_timestep >= int(config['train.timestep']*(checkpoint_count/(config['checkpoint.num'] - 1))):
agent.checkpoint(logdir, i + 1)
agent.checkpoint(logdir, i + 1)
checkpoint_count += 1
pickle_dump(obj=train_logs, f=logdir/'train_logs', ext='.pkl')
return None

Expand Down
Binary file modified baselines/vpg/logs/default/0/1500925526/agent_1.pth
Binary file not shown.
Binary file not shown.
Binary file modified baselines/vpg/logs/default/0/1500925526/agent_1000.pth
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed baselines/vpg/logs/default/0/1500925526/agent_50.pth
Binary file not shown.
Binary file modified baselines/vpg/logs/default/0/1500925526/agent_500.pth
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified baselines/vpg/logs/default/0/1500925526/train_logs.pkl
Binary file not shown.
Binary file modified baselines/vpg/logs/default/0/1770966829/agent_1.pth
Binary file not shown.
Binary file not shown.
Binary file modified baselines/vpg/logs/default/0/1770966829/agent_1000.pth
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed baselines/vpg/logs/default/0/1770966829/agent_50.pth
Binary file not shown.
Binary file modified baselines/vpg/logs/default/0/1770966829/agent_500.pth
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified baselines/vpg/logs/default/0/1770966829/train_logs.pkl
Binary file not shown.
Binary file modified baselines/vpg/logs/default/0/2054191100/agent_1.pth
Binary file not shown.
Binary file not shown.
Binary file modified baselines/vpg/logs/default/0/2054191100/agent_1000.pth
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed baselines/vpg/logs/default/0/2054191100/agent_50.pth
Binary file not shown.
Binary file modified baselines/vpg/logs/default/0/2054191100/agent_500.pth
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified baselines/vpg/logs/default/0/2054191100/train_logs.pkl
Binary file not shown.
2 changes: 1 addition & 1 deletion baselines/vpg/logs/default/0/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ID: 0
cuda: true
log.dir: logs/default
log.freq: 10
checkpoint.freq: 50
checkpoint.num: 3
env.standardize_obs: true
env.standardize_reward: true
nn.sizes:
Expand Down
Binary file modified baselines/vpg/logs/default/1/1500925526/agent_1.pth
Binary file not shown.
Binary file not shown.
Binary file modified baselines/vpg/logs/default/1/1500925526/agent_1000.pth
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed baselines/vpg/logs/default/1/1500925526/agent_50.pth
Binary file not shown.
Binary file modified baselines/vpg/logs/default/1/1500925526/agent_500.pth
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"initial_reset_timestamp": 1556549697.148877, "timestamps": [1556549706.9478707], "episode_lengths": [403], "episode_rewards": [1360.956948333378], "episode_types": ["t", "t"]}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"stats": "openaigym.episode_batch.0.3824624.stats.json", "videos": [["openaigym.video.0.3824624.video000000.mp4", "openaigym.video.0.3824624.video000000.meta.json"], ["openaigym.video.0.3824624.video000001.mp4", "openaigym.video.0.3824624.video000001.meta.json"]], "env_info": {"gym_version": "0.12.1", "env_id": "Hopper-v3"}}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"episode_id": 0, "content_type": "video/mp4", "encoder_version": {"backend": "ffmpeg", "version": "b'ffmpeg version 3.4.4-0ubuntu0.18.04.1 Copyright (c) 2000-2018 the FFmpeg developers\\nbuilt with gcc 7 (Ubuntu 7.3.0-16ubuntu3)\\nconfiguration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared\\nlibavutil 55. 78.100 / 55. 78.100\\nlibavcodec 57.107.100 / 57.107.100\\nlibavformat 57. 83.100 / 57. 83.100\\nlibavdevice 57. 10.100 / 57. 10.100\\nlibavfilter 6.107.100 / 6.107.100\\nlibavresample 3. 7. 0 / 3. 7. 0\\nlibswscale 4. 8.100 / 4. 8.100\\nlibswresample 2. 9.100 / 2. 9.100\\nlibpostproc 54. 7.100 / 54. 7.100\\n'", "cmdline": ["ffmpeg", "-nostats", "-loglevel", "error", "-y", "-r", "125", "-f", "rawvideo", "-s:v", "500x500", "-pix_fmt", "rgb24", "-i", "-", "-vf", "scale=trunc(iw/2)*2:trunc(ih/2)*2", "-vcodec", "libx264", "-pix_fmt", "yuv420p", "/home/zuo/Code/tmp/lagom/baselines/vpg/logs/default/1/1500925526/anim/openaigym.video.0.3824624.video000000.mp4"]}}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"episode_id": 1, "content_type": "video/mp4", "encoder_version": {"backend": "ffmpeg", "version": "b'ffmpeg version 3.4.4-0ubuntu0.18.04.1 Copyright (c) 2000-2018 the FFmpeg developers\\nbuilt with gcc 7 (Ubuntu 7.3.0-16ubuntu3)\\nconfiguration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared\\nlibavutil 55. 78.100 / 55. 78.100\\nlibavcodec 57.107.100 / 57.107.100\\nlibavformat 57. 83.100 / 57. 83.100\\nlibavdevice 57. 10.100 / 57. 10.100\\nlibavfilter 6.107.100 / 6.107.100\\nlibavresample 3. 7. 0 / 3. 7. 0\\nlibswscale 4. 8.100 / 4. 8.100\\nlibswresample 2. 9.100 / 2. 9.100\\nlibpostproc 54. 7.100 / 54. 7.100\\n'", "cmdline": ["ffmpeg", "-nostats", "-loglevel", "error", "-y", "-r", "125", "-f", "rawvideo", "-s:v", "500x500", "-pix_fmt", "rgb24", "-i", "-", "-vf", "scale=trunc(iw/2)*2:trunc(ih/2)*2", "-vcodec", "libx264", "-pix_fmt", "yuv420p", "/home/zuo/Code/tmp/lagom/baselines/vpg/logs/default/1/1500925526/anim/openaigym.video.0.3824624.video000001.mp4"]}}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified baselines/vpg/logs/default/1/1500925526/train_logs.pkl
Binary file not shown.
Binary file modified baselines/vpg/logs/default/1/1770966829/agent_1.pth
Binary file not shown.
Binary file not shown.
Binary file modified baselines/vpg/logs/default/1/1770966829/agent_1000.pth
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed baselines/vpg/logs/default/1/1770966829/agent_50.pth
Binary file not shown.
Binary file modified baselines/vpg/logs/default/1/1770966829/agent_500.pth
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified baselines/vpg/logs/default/1/1770966829/train_logs.pkl
Binary file not shown.
Binary file modified baselines/vpg/logs/default/1/2054191100/agent_1.pth
Binary file not shown.
Binary file not shown.
Binary file modified baselines/vpg/logs/default/1/2054191100/agent_1000.pth
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed baselines/vpg/logs/default/1/2054191100/agent_50.pth
Binary file not shown.
Binary file modified baselines/vpg/logs/default/1/2054191100/agent_500.pth
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified baselines/vpg/logs/default/1/2054191100/train_logs.pkl
Binary file not shown.
2 changes: 1 addition & 1 deletion baselines/vpg/logs/default/1/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ID: 1
cuda: true
log.dir: logs/default
log.freq: 10
checkpoint.freq: 50
checkpoint.num: 3
env.standardize_obs: true
env.standardize_reward: true
nn.sizes:
Expand Down
Binary file modified baselines/vpg/logs/default/2/1500925526/agent_1.pth
Binary file not shown.
Binary file not shown.
Binary file modified baselines/vpg/logs/default/2/1500925526/agent_1000.pth
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed baselines/vpg/logs/default/2/1500925526/agent_50.pth
Binary file not shown.
Binary file modified baselines/vpg/logs/default/2/1500925526/agent_500.pth
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit bd32d9e

Please sign in to comment.