Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building it on Cloud-9. Pywrap_tensorflow not found. #1

Open
Eulerianial opened this issue May 16, 2016 · 12 comments
Open

Building it on Cloud-9. Pywrap_tensorflow not found. #1

Eulerianial opened this issue May 16, 2016 · 12 comments

Comments

@Eulerianial
Copy link

Siraj,

While running on a Cloud-IDE, I see the following issue:
libdc1394 error: Failed to initialize libdc1394
Traceback (most recent call last):
File "atari.py", line 5, in
from train import Trainer
File "/home/ubuntu/workspace/Game-AI/train.py", line 2, in
import tensorflow as tf
File "/home/ubuntu/workspace/tensorflow/tensorflow/init.py", line 23, in
from tensorflow.python import *
File "/home/ubuntu/workspace/tensorflow/tensorflow/python/init.py", line 48, in
from tensorflow.python import pywrap_tensorflow
ImportError: cannot import name pywrap_tensorflow

Any clue/tips to help here?

Best,
Vijay

@llSourcell
Copy link
Owner

Hmm looks like you are running this on an Ubuntu machine. Have you checked to make sure you've installed the ubuntu version of tensorflow instead of the mac os x version?

https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html

@Eulerianial
Copy link
Author

Siraj, I installed the linux version only:
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl

I just checked my other tensor flow code is working. For example, I was able to run this fine:

import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))

a = tf.constant(10)
b = tf.constant(32)

print(sess.run(a + b))

@Eulerianial
Copy link
Author

Siraj, quickly to share, I am able to start the training process for your code.
Just to ask, how much time it took you for training?

@llSourcell
Copy link
Owner

Awesome, glad to hear it! What was the problem? It took me a full day. Keep me updated with your results!

@Eulerianial
Copy link
Author

I moved to the local build as opposed to cloud and it worked there. Now I saw this issues:

Traceback (most recent call last):
File "atari.py", line 61, in
env.gym.monitor.start(args.out, force=True)
File "/usr/local/lib/python2.7/dist-packages/gym/monitoring/monitor.py", line 113, in start
if not os.path.exists(directory):
File "/usr/lib/python2.7/genericpath.py", line 18, in exists
os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found

So working on that. Any tips?

@llSourcell
Copy link
Owner

yup, i pushed a fix for that recently, pull the latest from master. It should work now, let me know if it doesn't.

@Eulerianial
Copy link
Author

Sure, I will try again. And just to share I am running the default environment.
python atari.py

@Eulerianial
Copy link
Author

Also, when I start it, it says:
libdc1394 error: Failed to initialize libdc1394
[2016-05-18 09:10:34,500] Making new env: SpaceInvaders-v0
start 50000 random plays to populate replay memory
What is that error?

@llSourcell
Copy link
Owner

Hmm libdc1394 is related to OpenCV. Some people have had success by disabling the driver http://stackoverflow.com/questions/12689304/ctypes-error-libdc1394-error-failed-to-initialize-libdc1394 another possible solution is installing OpenCV via Anaconda

download anaconda: https://www.continuum.io/downloads

conda install -c condo-forge opencv

@Eulerianial
Copy link
Author

Looks like it moved ahead. The simulation ended with this:

Training step: 17120
memory size: 67120
Learning rate: 0.9845929
Successes: 916
Failures: 97
Sample successes: 1859
Sample failures: 214
Average batch loss: 0.0286087147397
Batch training time: 0.643544562161 s

Training step: 17152

memory size: 67152

Now do we have to push these to Open-AI evaluations to see the game and graphics? How to do that?

@Eulerianial
Copy link
Author

Siraj, may I know at the end of the simulation the game will start automatically? Somehow it is not happening for me, though looks like Tensor flow is able to train the agent.

@llSourcell
Copy link
Owner

^ hey sorry for the late reply @Eulerianial i went ahead and fixed the readme, you just have to add '--display true' to the command line function when you run it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants