GithubHelp home page GithubHelp logo

Comments (3)

Amir-Ramezani avatar Amir-Ramezani commented on June 11, 2024

I changed the python version to 2.7 but still receiving the following error:

DDPG-master$ python ddpg_main.py
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.
[2017-04-06 21:45:52,907] Making new env: Pendulum-v0
[2017-04-06 21:45:52,911] DEPRECATION WARNING: env.spec.timestep_limit has been deprecated. Replace your call to env.spec.timestep_limit with env.spec.tags.get('wrapper_config.TimeLimit.max_episode_steps'). This change was made 12/28/2016 and is included in version 0.7.0
[2017-04-06 21:45:52,911] Creating monitor directory ./results/Pendulum-v0/20170406214552/gym_ddpg
Continuous
0%| | 0/100000 [00:00<?, ?it/s][2017-04-06 21:45:53,228] Starting new video recorder writing to /home/amir-ai/DDPG-Codes/slowbull/DDPG-master/results/Pendulum-v0/20170406214552/gym_ddpg/openaigym.video.0.22739.video000000.mp4

Traceback (most recent call last):
File "ddpg_main.py", line 133, in
tf.app.run()
File "/usr/local/lib/python2.7/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 "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 123, in reset
observation = self._reset()
File "/usr/local/lib/python2.7/dist-packages/gym/wrappers/monitoring.py", line 29, in _reset
self._monitor._after_reset(observation)
File "/usr/local/lib/python2.7/dist-packages/gym/monitoring/monitor_manager.py", line 265, in _after_reset
self._reset_video_recorder()
File "/usr/local/lib/python2.7/dist-packages/gym/monitoring/monitor_manager.py", line 286, in _reset_video_recorder
self.video_recorder.capture_frame()
File "/usr/local/lib/python2.7/dist-packages/gym/monitoring/video_recorder.py", line 106, in capture_frame
frame = self.env.render(mode=render_mode)
File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 174, in render
return self._render(mode=mode, close=close)
File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 341, in _render
return self.env.render(mode, close)
File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 174, in render
return self._render(mode=mode, close=close)
File "/usr/local/lib/python2.7/dist-packages/gym/envs/classic_control/pendulum.py", line 66, in _render
from gym.envs.classic_control import rendering
File "/usr/local/lib/python2.7/dist-packages/gym/envs/classic_control/rendering.py", line 23, in
from pyglet.gl import *
File "/usr/local/lib/python2.7/dist-packages/pyglet/gl/init.py", line 236, in
import pyglet.window
File "/usr/local/lib/python2.7/dist-packages/pyglet/window/init.py", line 1817, in
gl._create_shadow_window()
File "/usr/local/lib/python2.7/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/python2.7/dist-packages/pyglet/window/xlib/init.py", line 163, in init
super(XlibWindow, self).init(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pyglet/window/init.py", line 505, in init
config = screen.get_best_config(template_config)
File "/usr/local/lib/python2.7/dist-packages/pyglet/canvas/base.py", line 161, in get_best_config
configs = self.get_matching_configs(template)
File "/usr/local/lib/python2.7/dist-packages/pyglet/canvas/xlib.py", line 179, in get_matching_configs
configs = template.match(canvas)
File "/usr/local/lib/python2.7/dist-packages/pyglet/gl/xlib.py", line 29, in match
have_13 = info.have_version(1, 3)
File "/usr/local/lib/python2.7/dist-packages/pyglet/gl/glx_info.py", line 89, in have_version
client = [int(i) for i in client_version.split('.')]
ValueError: invalid literal for int() with base 10: 'None'
[2017-04-06 21:45:53,408] Finished writing results. You can upload them to the scoreboard via gym.upload('/home/amir-ai/DDPG-Codes/slowbull/DDPG-master/results/Pendulum-v0/20170406214552/gym_ddpg')
Segmentation fault (core dumped)

from ddpg.

slowbull avatar slowbull commented on June 11, 2024

There is no problem on my machine. Looks like the error is from pyglet ?

from ddpg.

Amir-Ramezani avatar Amir-Ramezani commented on June 11, 2024

I seems to be a problem between the tensorflow initialization and gym, based on some search results.
So, if I move the following lines to top so change the main file like this:

import numpy as np
import datetime
import gym
from gym.wrappers import Monitor

env = gym.make("Pendulum-v0")
env.reset()
env.render()

then there is no problem and it works fine.

Thanks for your code.

from ddpg.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.