spragunr / deep_q_rl

Theano-based implementation of Deep Q-learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No results.csv or .pkl files?

AjayTalati opened this issue · comments

Hi, for some reason I'm not getting any results.csv file or .pkl file. The data folders created, and ALE and RL-Glue seem to be starting? Its a fresh build with ALE from Git.

I had to change one line in ale_run.py as ale was not found,

#p2 = subprocess.Popen('ale -game_controller rlglue -frame_skip 4 '+ ROM_PATH, shell=True, env=my_env)
p2 = subprocess.Popen('/home/ajay/ale/ale -game_controller rlglue -frame_skip 4 '+ ROM_PATH, shell=True, env=my_env)

Here's the output

/usr/bin/python2.7 /home/ajay/PythonProjects/deep_q_rl/ale_run.py
RL-Glue Version 3.04, Build 909
A.L.E: Arcade Learning Environment (version 0.4.4)
[Powered by Stella]
Use -help for help screen.
Warning: couldn't load settings file: ./stellarc
Game console created:
  ROM file:  /home/ajay/ale/roms/breakout.bin
  Cart Name: Breakout - Breakaway IV (1978) (Atari)
  Cart MD5:  f34f08e5eb96e500e851a80be3277a56
  Display Format:  AUTO-DETECT ==> NTSC
  ROM Size:        2048
  Bankswitch Type: AUTO-DETECT ==> 2K

Running ROM file...
Random Seed: Time
Game will be controlled through RL-Glue.
RL-Glue Python Experiment Codec Version: 2.02 (Build 738)
    Connecting to 127.0.0.1 on port 4096...
Initializing ALE RL-Glue ...
Using gpu device 0: GeForce GTX 570
RL-Glue Python Agent Codec Version: 2.02 (Build 738)
    Connecting to 127.0.0.1 on port 4096...
     Agent Codec Connected
(32, 4, 80, 80)
(4, 80, 80, 32)
(16, 19.0, 19.0, 32)
(32, 9.0, 9.0, 32)
(32, 32, 9.0, 9.0)
(32, 256)
(32, 18)
Traceback (most recent call last):
  File "./rl_glue_ale_agent.py", line 427, in <module>
    main()
  File "./rl_glue_ale_agent.py", line 423, in main
    AgentLoader.loadAgent(NeuralAgent())
  File "/usr/local/lib/python2.7/dist-packages/rlglue/agent/AgentLoader.py", line 58, in loadAgent
    client.runAgentEventLoop()
  File "/usr/local/lib/python2.7/dist-packages/rlglue/agent/ClientAgent.py", line 144, in runAgentEventLoop
    switch[agentState](self)
  File "/usr/local/lib/python2.7/dist-packages/rlglue/agent/ClientAgent.py", line 137, in <lambda>
    Network.kAgentInit: lambda self: self.onAgentInit(),
  File "/usr/local/lib/python2.7/dist-packages/rlglue/agent/ClientAgent.py", line 43, in onAgentInit
    self.agent.agent_init(taskSpec)
  File "./rl_glue_ale_agent.py", line 155, in agent_init
    self.network = self._init_network()
  File "./rl_glue_ale_agent.py", line 189, in _init_network
    approximator='cuda_conv')
  File "/home/ajay/PythonProjects/deep_q_rl/cnn_q_learner.py", line 168, in __init__
    target = theano.gradient.consider_constant(target)
AttributeError: 'module' object has no attribute 'consider_constant'
training epoch:  1 steps_left:  50000
Segmentation fault (core dumped)
training epoch:  1 steps_left:  49995
training epoch:  1 steps_left:  49993

Just in case it helps, here's my PYTHONPATH from .bashrc

PYTHONPATH="/home/ajay/pylearn2:/home/ajay/pylearn2/pylearn2/scripts:/home/ajay/ale:$PYTHONPATH"
export PYTHONPATH

Thanks a lot 👍 Happy New Year 👍

You most likely are using an old version of Theano. The git log says consider_constant got moved to the gradient module in March this year. git pull and install should fix that issue

Thank you 👍 That was the problem, and the fix! Pulled from git and used develop instead of install,

sudo python setup.py develop

Also had a problem with CUDA, cublas, but that was fixed with

sudo ldconfig /usr/local/cuda-6.5/lib64

Guess the points learn are

  1. always get the bleeding edge from Git and setup as a developer. pip does'nt seem to be the best way to do things?

  2. look at the Git logs to see if your error has a fix?