slowbull / ddpg Goto Github PK
View Code? Open in Web Editor NEWTensorflow implementation of Deep Deterministic Policy Gradients
Tensorflow implementation of Deep Deterministic Policy Gradients
Hi,
I tried to set the render flag to True but I received the following error:
DDPG-master$ python3 ddpg_main.py
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:910] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 0 with properties:
name: GeForce GTX 1080
major: 6 minor: 1 memoryClockRate (GHz) 1.898
pciBusID 0000:01:00.0
Total memory: 7.92GiB
Free memory: 332.19MiB
I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0
I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0: Y
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1080, pci bus id: 0000:01:00.0)
[2017-04-06 14:05:08,630] Making new env: Pendulum-v0
[2017-04-06 14:05:08,636] Creating monitor directory ./results/Pendulum-v0/20170406140508/gym_ddpg
Continuous
0%| | 0/100000 [00:00<?, ?it/s][2017-04-06 14:05:10,029] Starting new video recorder writing to /home/amir-ai/DDPG-Codes/slowbull/DDPG-master/results/Pendulum-v0/20170406140508/gym_ddpg/openaigym.video.0.3584.video000000.mp4
Traceback (most recent call last):
File "ddpg_main.py", line 133, in
tf.app.run()
File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/platform/app.py", line 44, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "ddpg_main.py", line 129, in main
agent.train()
File "/home/amir-ai/DDPG-Codes/slowbull/DDPG-master/src/agent/ddpg_agent.py", line 35, in train
self.evaluate(cur_episode)
File "/home/amir-ai/DDPG-Codes/slowbull/DDPG-master/src/agent/ddpg_agent.py", line 117, in evaluate
state = self.env.reset()
File "/home/amir-ai/gym/gym/core.py", line 123, in reset
observation = self._reset()
File "/home/amir-ai/gym/gym/wrappers/monitoring.py", line 41, in _reset
self._after_reset(observation)
File "/home/amir-ai/gym/gym/wrappers/monitoring.py", line 198, in _after_reset
self._reset_video_recorder()
File "/home/amir-ai/gym/gym/wrappers/monitoring.py", line 219, in _reset_video_recorder
self.video_recorder.capture_frame()
File "/home/amir-ai/gym/gym/monitoring/video_recorder.py", line 106, in capture_frame
frame = self.env.render(mode=render_mode)
File "/home/amir-ai/gym/gym/core.py", line 174, in render
return self._render(mode=mode, close=close)
File "/home/amir-ai/gym/gym/core.py", line 341, in _render
return self.env.render(mode, close)
File "/home/amir-ai/gym/gym/core.py", line 174, in render
return self._render(mode=mode, close=close)
File "/home/amir-ai/gym/gym/envs/classic_control/pendulum.py", line 66, in _render
from gym.envs.classic_control import rendering
File "/home/amir-ai/gym/gym/envs/classic_control/rendering.py", line 23, in
from pyglet.gl import *
File "/usr/local/lib/python3.4/dist-packages/pyglet/gl/init.py", line 236, in
import pyglet.window
File "/usr/local/lib/python3.4/dist-packages/pyglet/window/init.py", line 1816, in
gl._create_shadow_window()
File "/usr/local/lib/python3.4/dist-packages/pyglet/gl/init.py", line 205, in _create_shadow_window
_shadow_window = Window(width=1, height=1, visible=False)
File "/usr/local/lib/python3.4/dist-packages/pyglet/window/xlib/init.py", line 163, in init
super(XlibWindow, self).init(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/pyglet/window/init.py", line 504, in init
config = screen.get_best_config(template_config)
File "/usr/local/lib/python3.4/dist-packages/pyglet/canvas/base.py", line 161, in get_best_config
configs = self.get_matching_configs(template)
File "/usr/local/lib/python3.4/dist-packages/pyglet/canvas/xlib.py", line 179, in get_matching_configs
configs = template.match(canvas)
File "/usr/local/lib/python3.4/dist-packages/pyglet/gl/xlib.py", line 29, in match
have_13 = info.have_version(1, 3)
File "/usr/local/lib/python3.4/dist-packages/pyglet/gl/glx_info.py", line 86, in have_version
client_version = self.get_client_version().split()[0]
File "/usr/local/lib/python3.4/dist-packages/pyglet/gl/glx_info.py", line 118, in get_client_version
return asstr(glXGetClientString(self.display, GLX_VERSION))
File "/usr/local/lib/python3.4/dist-packages/pyglet/compat.py", line 88, in asstr
return s.decode("utf-8")
AttributeError: 'NoneType' object has no attribute 'decode'
[2017-04-06 14:05:10,204] Finished writing results. You can upload them to the scoreboard via gym.upload('/home/amir-ai/DDPG-Codes/slowbull/DDPG-master/results/Pendulum-v0/20170406140508/gym_ddpg')
Could you tell me what do you think is the problem?
The code runs without problem when the flag is set to False.
I am using python3.4 and I tested gym separately and it rendered the env with no issue.
Thanks,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.