-
Notifications
You must be signed in to change notification settings - Fork 142
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
Connecting debugger and TensorFlow #2
Comments
There is an issue with python3, try all of this in python2 (works for me) |
@jesuisnicolasdavid Thanks. I tried it again with Anaconda2. It still does not import tdb or tensorflow. Jupyter was already installed but I started Python in the anaconda2 directory and ran this part again. It seemed to install.
Note, for anaconda2 I did not need to change:
I also git cloned TDB into the anaconda2 directory to get the MNIST notebook.
['', '/home/lee/anaconda2/lib/python27.zip', '/home/lee/anaconda2/lib/python2.7', '/home/lee/anaconda2/lib/python2.7/plat-linux2', '/home/lee/anaconda2/lib/python2.7/lib-tk', '/home/lee/anaconda2/lib/python2.7/lib-old', '/home/lee/anaconda2/lib/python2.7/lib-dynload', '/home/lee/.local/lib/python2.7/site-packages', '/home/lee/anaconda2/lib/python2.7/site-packages/Sphinx-1.3.1-py2.7.egg', '/home/lee/anaconda2/lib/python2.7/site-packages/setuptools-18.5-py2.7.egg', '/home/lee/anaconda2/lib/python2.7/site-packages', '/home/lee/anaconda2/lib/python2.7/site-packages/cryptography-1.0.2-py2.7-linux-x86_64.egg', '/home/lee/anaconda2/lib/python2.7/site-packages/IPython/extensions', '/home/lee/.ipython', '/home/lee/anaconda2', '/home/lee/anaconda2/tdb', '/home/lee/anaconda2/tdb/tdb']
|
Maybe you can try to redo everything in python 2 but within a clean install aka a virtual environnement. |
@jesuisnicolasdavid Thanks. I tried a virtualenv and ended with 'Too many levels of symbolic links'
bash: /home/lee/vtflow/vtflow/bin/pip: /home/lee/vtflow/vtflow/bin/python: bad interpreter: Too many levels of symbolic links` I looked in vtflow/bin
|
@technologiclee did you install Tensorflow using https://www.tensorflow.org/versions/0.6.0/get_started/os_setup.html#virtualenv_install? It's likely an issue with TensorFlow installation rather than TDB since the latter is pretty simple when it comes to dependencies. |
@ericjang @jesuisnicolasdavid Thanks! I have been using the master branch page not the 0.6.0 version, the pip install link is the same as I used before. This time I used the --system-site-packages option. Here are my install notes:
`pip install tfdebugger
Using pip
('tdb_ext.zip', <httplib.HTTPMessage instance at 0x7fe43d215e60>)
Now exit from the Python interpretor with:
This will start the Juypter server in your browser. You can open the floder tbd by clicking on it. |
This is fully functional now with virtual environment and Python2. Thanks everyone! I was wrong about the images. I did not wait long enough for the processing to finish. |
Hi i am using import tdb using jupyter in windows. I changed path to my system path, i am unable to import tdb, i am thinking tdb as a folderand mnist, viz are the sub files in the folder. Can you help me get pass through this? |
@technologiclee so I finally got TBD Connected: success after executing Run All from the Cell menu, but unfortunately nothing has loaded beyond that. I have noticed some errors (AttributeError: 'module' object has no attribute 'histogram_summary') appeared after running all as follows:
Any idea how I can troubleshoot this? |
I have followed the instructions and changed the example on two computers:
sys.path.append('/home/evjang/thesis/tensor_debugger')
sys.path.append('/home/lee/softwareinstalled/anaconda3-5/tdb_ext')
sys.path.append('/home/mylao/tdb')
Is this the correct location?
I get this message:
“Waiting for TDB to connect...”
The MNIST exapmle was not in the tdb_ext download so I cloned TDB from Git also.
https://github.com/ericjang/tdb/releases/download/tdb_ext_v0.1/tdb_ext.zip
https://github.com/ericjang/tdb.git
import notebook.nbextensions
import urllib
import zipfile
SOURCE_URL = 'https://github.com/ericjang/tdb/releases/download/tdb_ext_v0.1/tdb_ext.zip'
urllib.urlretrieve(SOURCE_URL, 'tdb_ext.zip')
with zipfile.ZipFile('tdb_ext.zip', "r") as z:
z.extractall("")
notebook.nbextensions.install_nbextension('tdb_ext',user=True)
There has been some change, I think it is supposed to be like this now:
http://stackoverflow.com/questions/17960942/attributeerror-module-object-has-no-attribute-urlretrieve
import urllib.request
data = urllib.request.urlretrieve("http://...")
I foolishly thought this comment was changing the location was was trying to modify it there!
sys.path.append('/home/
Now I think it means to change /home/.bashrc
Here is a helpful note for noobs like me:
add this line to the bottom of /home/.bashrc
export PATH="/home/lee/softwareInstalled/anaconda3-5/tdb_ext:$PATH"
refresh .bashrc with . ~/.bashrc or logout and logback in
It seems to load tensorflow and urllib but not the other imports.
This is the bottom of /home/.bashrc
added by Anaconda3 2.4.1 installer
export PATH="/home/lee/anaconda3/bin:$PATH"
export PATH="/home/lee/softwareInstalled/anaconda3-5/tdb_ext:$PATH"
export PATH="/home/lee/softwareInstalled/anaconda3-5/tdb_ext/tdb:$PATH"
export PATH="/home/lee/softwareinstalled/anaconda3-5/tdb_ext/tdb/tdb/examples:$PATH"
lee@lee-VGN-NR21E-S:~$ echo $PATH
/home/lee/softwareInstalled/anaconda3-5/tdb_ext/tdb:/home/lee/softwareInstalled/anaconda3-5/tdb_ext:/home/lee/anaconda3/bin:/home/lee/softwareInstalled/anaconda3-5/tdb_ext/tdb:/home/lee/anaconda3/bin:/home/lee/softwareInstalled/anaconda3-5/tdb_ext:/home/lee/anaconda3/bin:/home/lee/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
import tdb
from tdb.examples import mnist, viz
import matplotlib.pyplot as plt
import tensorflow as tf
import urllib
ImportError Traceback (most recent call last)
in ()
5 #refresh .bashrc with . ~/.bashrc or logout and logback in
6
----> 7 import tdb
8 from tdb.examples import mnist, viz
9 import matplotlib.pyplot as plt
/home/lee/anaconda3/lib/python3.5/site-packages/tdb/init.py in ()
6 """
7
----> 8 from interface import debug, c, s, get_exe_queue, get_value
9 import op_store
10 from plot_op import plot_op
ImportError: No module named 'interface'
I uncommented this line, now I get:
sys.path.append('/home/lee/softwareinstalled/anaconda3-5/tdb_ext')
----> 2 sys.path.append('/home/lee/softwareinstalled/anaconda3-5/tdb_ext')
NameError: name 'sys' is not defined
I uncommented this line so the 'sys' error goes away.
import sys
Now I am back to this error:
7 import tdb
8 from tdb.examples import mnist, viz
9 import matplotlib.pyplot as plt
/home/lee/anaconda3/lib/python3.5/site-packages/tdb/init.py in ()
6 """
7
----> 8 from interface import debug, c, s, get_exe_queue, get_value
9 import op_store
10 from plot_op import plot_op
ImportError: No module named 'interface'
Now I have this:
import sys
sys.path.append('/home/lee/softwareinstalled/anaconda3-5/tdb_ext')
sys.path.append('/home/lee/softwareinstalled/anaconda3-5/tdb_ext/tdb/tdb/')
sys.path.append('/usr/local/lib/python2.7/dist-packages/tensorflow')
/home/lee/anaconda3/lib/python3.5/site-packages/tdb/init.py in ()
6 """
7
----> 8 from interface import debug, c, s, get_exe_queue, get_value
9 import op_store
10 from plot_op import plot_op
/home/lee/softwareinstalled/anaconda3-5/tdb_ext/tdb/tdb/interface.py in ()
4 """
5
----> 6 import debug_session
7
8 # default session
/home/lee/softwareinstalled/anaconda3-5/tdb_ext/tdb/tdb/debug_session.py in ()
1
2 from ht_op import HTOp
----> 3 import op_store
4 import tensorflow as tf
5
/home/lee/softwareinstalled/anaconda3-5/tdb_ext/tdb/tdb/op_store.py in ()
1 from toposort import toposort, toposort_flatten
2 from transitive_closure import transitive_closure
----> 3 import tensorflow as tf
4
5 _ops={} # Map<string,tdb.PythonOp>
ImportError: No module named 'tensorflow'
lee@lee-VGN-NR21E-S:~$ echo $PATH
/usr/local/lib/python2.7/dist-packages/tensorflow:
/home/lee/softwareinstalled/anaconda3-5/tdb_ext/tdb/tdb/examples:
/home/lee/softwareInstalled/anaconda3-5/tdb_ext/tdb:
/home/lee/softwareInstalled/anaconda3-5/tdb_ext:
/home/lee/anaconda3/bin:/home/lee/softwareinstalled/anaconda3-5/tdb_ext/tdb/tdb/examples:
/home/lee/softwareInstalled/anaconda3-5/tdb_ext/tdb:/home/lee/softwareInstalled/anaconda3-5/tdb_ext:
/home/lee/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:
/usr/bin:/sbin:/bin:/usr/games:
/usr/local/games
lee@lee-VGN-NR21E-S:~$ echo $PYTHONPATH
Now it looks like this, still not finding TensorFlow:
import sys
sys.path.append('/home/lee/softwareinstalled/anaconda3-5/tdb_ext')
sys.path.append('/home/lee/softwareinstalled/anaconda3-5/tdb_ext/tdb/tdb/')
sys.path.append('/usr/local/lib/python2.7/dist-packages/tensorflow')
print (sys.path)
import tdb
from tdb.examples import mnist, viz
import matplotlib.pyplot as plt
import tensorflow as tf
import urllib
['', '/home/lee/anaconda3/lib/python35.zip', '/home/lee/anaconda3/lib/python3.5', '/home/lee/anaconda3/lib/python3.5/plat-linux', '/home/lee/anaconda3/lib/python3.5/lib-dynload', '/home/lee/anaconda3/lib/python3.5/site-packages/Sphinx-1.3.1-py3.5.egg', '/home/lee/anaconda3/lib/python3.5/site-packages/setuptools-19.4-py3.5.egg', '/home/lee/anaconda3/lib/python3.5/site-packages', '/home/lee/anaconda3/lib/python3.5/site-packages/cryptography-1.0.2-py3.5-linux-x86_64.egg', '/home/lee/anaconda3/lib/python3.5/site-packages/IPython/extensions', '/home/lee/.ipython', '/home/lee/softwareinstalled/anaconda3-5/tdb_ext', '/home/lee/softwareinstalled/anaconda3-5/tdb_ext/tdb/tdb/', '/usr/local/lib/python2.7/dist-packages/tensorflow']
ImportError Traceback (most recent call last)
in ()
8 #refresh .bashrc with . ~/.bashrc or logout and logback in
9
---> 10 import tdb
11 from tdb.examples import mnist, viz
12 import matplotlib.pyplot as plt
/home/lee/anaconda3/lib/python3.5/site-packages/tdb/init.py in ()
6 """
7
----> 8 from interface import debug, c, s, get_exe_queue, get_value
9 import op_store
10 from plot_op import plot_op
/home/lee/softwareinstalled/anaconda3-5/tdb_ext/tdb/tdb/interface.py in ()
4 """
5
----> 6 import debug_session
7
8 # default session
/home/lee/softwareinstalled/anaconda3-5/tdb_ext/tdb/tdb/debug_session.py in ()
1
2 from ht_op import HTOp
----> 3 import op_store
4 import tensorflow as tf
5
/home/lee/softwareinstalled/anaconda3-5/tdb_ext/tdb/tdb/op_store.py in ()
1 from toposort import toposort, toposort_flatten
2 from transitive_closure import transitive_closure
----> 3 import tensorflow as tf
4
5 _ops={} # Map<string,tdb.PythonOp>
ImportError: No module named 'tensorflow'
Any advice would be appreciated
Thanks,
Lee
The text was updated successfully, but these errors were encountered: