Code Monkey home page Code Monkey logo

tensorboard's Introduction

Standalone TensorBoard

TensorBoard is a suite of web applications for inspecting and understanding your TensorFlow runs and graphs. TensorBoard currently supports five visualizations: scalars, images, audio, histograms, and the graph.

This README gives an overview of key concepts in TensorBoard, as well as how to interpret the visualizations TensorBoard provides. For an in-depth example of using TensorBoard, see the tutorial: TensorBoard: Visualizing Learning. For in-depth information on the Graph Visualizer, see this tutorial: TensorBoard: Graph Visualization.

Installing from source

When installing from source you will build a pip wheel that you then install using pip. We provide a installer.sh and build_pip_package.sh for you to get that pip wheel.

We’re also working on providing a pre-built pip wheel for you, so you can install TensorBoard package more easily. We would let you know once we finish this feature but currently it has to be installed from source.

Clone the TensorBoard repository

$ git clone https://github.com/dmlc/tensorboard.git

Prepare environment for Linux

Install Protocol Compiler

Note that this requires Protocol Buffers 3 compiler, so please install it.

Install Bazel

We use Bazel 0.6.1 here

Install other dependencies

# For Python 2.7:
$ sudo apt-get install python-numpy python-dev python-wheel python-mock python-protobuf
# For Python 3.x:
$ sudo apt-get install python3-numpy python3-dev python3-wheel python3-mock
# With a virtualenv (export needs to be done for subsequent builds, too):
$ pip install -r requirements.txt && export PYTHON_BIN_PATH=$VIRTUAL_ENV/bin/python

Prepare environment for Mac OS X

Install Protocol Compiler

Note that this requires Protocol Buffers 3 compiler, so please install it.

Install Bazel

Follow instructions here to install the dependencies for bazel. You can then use homebrew to install bazel(here we use v0.6.1):

$ brew install bazel

Dependencies

You can install the python dependencies using easy_install or pip, or conda if you use Anaconda for virtual-env management. Using conda, run

$ conda install six, numpy, wheel, protobuf

Build

After that, to build the first part, simply:

$ cd tensorboard
$ sh installer.sh
# In this process, it might need configuration or failed in bazel build, just retry the specific step.

Configure the installation

For example(just type ’N’ for all case as we don’t need them):

$ ./configure
Please specify the location of python. [Default is /usr/bin/python]:
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] N
No Google Cloud Platform support will be enabled for TensorFlow
Do you wish to build TensorFlow with GPU support? [y/N] N
Do you wish to build TensorFlow with OpenCL support? [y/N] N

Usage

dmlc/tensorboard contains two parts in general, currently we have Python interface for writing/logging scalar, histogram and image data to EventFile, which the front-end load data from this event file for visualization.

Technically, we reuse the rendering part of original TensorBoard of TensorFlow, but rewrite the logging part in pure Python without touching the TensorFlow code. We've try to keep the concepts consistent but the logging API might has some slightly difference.

Logging

See README in Python package.

Rendering

$ tensorboard --logdir=path/to/logs

Contribute

You might want to see the development note of this project at our DMLC blog: Bring TensorBoard to MXNet

Feel free to contribute your work and don't hesitate to discuss in issue with your ideas.

tensorboard's People

Contributors

chaonan99 avatar jopyth avatar lou-k avatar mli avatar ozancaglayan avatar piiswrong avatar zihaolucky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tensorboard's Issues

Tensorboard SummaryWriter

I am trying to run one code that I forked from here. This uses tensorboard as given in the following line:
logger = tensorboard.SummaryWriter('./log')
This throws an error saying :

AttributeError: module 'tensorboard' has no attribute 'SummaryWriter'

Any suggestions what should I do next?

No script named 'tensorboard'

after collecting logs, run command tensorboard --logdir=logs/, get error below:

Traceback (most recent call last):
  File "/bin/tensorboard", line 4, in <module>
    __import__('pkg_resources').run_script('tensorboard', 'tensorboard')
  File "../lib/python2.7/site-packages/pkg_resources/__init__.py", line 739, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "../lib/python2.7/site-packages/pkg_resources/__init__.py", line 1486, in run_script
    raise ResolutionError("No script named %r" % script_name)
pkg_resources.ResolutionError: No script named 'tensorboard'

Issue when both python2 and python3 installed

I've encountered a issue when both python2 and 3 are installed on the same machine but tensorboard is installed via python3. (Typically python2 is called via python and python3 via python3 in this situation.) But FindPythonBinary function won't realize that now. Currently I just hacked into the script and force it to search python3, but I believe there is a better way.

Error message below:

Traceback (most recent call last):
  File "/home/chenhaonan/.local/lib/python3.5/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/tensorboard/tensorboard.py", line 32, in <module>
    from tensorflow.python.summary import event_file_inspector as efi
  File "/home/chenhaonan/.local/lib/python3.5/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/summary/event_file_inspector.py", line 122, in <module>
    from tensorflow.python.platform import gfile
  File "/home/chenhaonan/.local/lib/python3.5/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/platform/gfile.py", line 22, in <module>
    from tensorflow.python.lib.io.file_io import copy as Copy
  File "/home/chenhaonan/.local/lib/python3.5/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/lib/io/file_io.py", line 27, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/home/chenhaonan/.local/lib/python3.5/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "/home/chenhaonan/.local/lib/python3.5/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: /home/chenhaonan/.local/lib/python3.5/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow.so: und

Error mx.tensorboard

Hello,

I have an error I do not succeed to solve.

batch_end_callbacks = [mx.tensorboard.LogMetricsCallback(training_log)] 
AttributeError: 'module' object has no attribute 'tensorboard'

I installed tensorboard with pip and it seems to work when I call tensor board alone. But when I want to use it with mxnet, it gives me this error. Does someone have an idea to solve this problem ?

Thanks for the help !

The PyPI package is no longer maintain due to some reasons

All our users,

Glad to create and maintain this project, and happy to know people love it. From the stat, I see every day hundreds of people visiting this repo and using this work. We've also made a PyPI for you, packing all the need for convenience. Many users have involved in this project, contribute your code and report issues.

But I regret to tell you we've just lost the PyPI repo a few minutes ago, I just received a notification mail from PSF said the ownership of the tensorboard PyPI repo has been changed to Google. Without any acknowledgment from me :(

As I've mentioned in #19, a guy from TensorBoard dev team reached me, maybe a month ago, and asked me to give up the ownership as they're going to release the TensorBoard on its own so they want the tensorboard name.

I understand his concerns and respect the work the origin dev team have done. I was going to work with them, trying to push the Standalone TensorBoard a step forward, which is the motivation of this project, to make it benefits even more users. We even discussed possible ways to keep my project's stability, backward compatibility(to merge the logging part back to TensorBoard) and the value of creating a framework-independent layer for logging summaries, then achieve our goal. But I have some work to do before directly hand over the repo to them, as the TensorBoard dev team is in leading position, then I was waiting for their plan.

But the discussion was not satisfying, as the guy from TensorBoard said they're going to keep having TensorFlow as a runtime dependency, which means, even we use the TensorBoard they've released, you still have to log the summary via TensorFlow. He said they might provide a configuration endpoint for our project to change the final built binary tensorboard so there won't be any confusion. But I haven't seen that tool. Throughout the conversation, it made me feel that I have no choice but to do as they want. Besides, I'm going to change the project name(as they want) by using the independent version TensorBoard but failed to do so, because of the TensorFlow dependencies.

Then a guy from PSF came to me and asked me the same thing. I have to claim the rights I have as a PyPI user, the work I have to do as a project maintainer, and explain the objectives of this project and why we do so. Here I want to tell everyone, the reason I kept the tensorboard name is, same as most of the users, that I appreciate the work the TensorBoard team have done(you can also get this message after you read the headline of this project). The PyPI tensorboard we've provided is also for convenience, people won't have to install TensorFlow to use TensorBoard. I have no interest in the name itself, but to provide a pure, framework-independent TensorBoard, a real open-sourced tool.

We'll keep going in this direction, but seems we're not allowed to use words like tensorboard or even tensor I guess, I wish I can use PyPI without afraid of losing it overnight. For our users, we'll keep the source code building method and provide another PyPI after we finish the work.

Here I want to call for your contribution, let's make a real open-sourced project for every deep learning lovers. I guess maybe it's time for me to learn some frontend or backend web dev skills.

Best,
Zihao

cannot import name event_pb2

get an import error.

---> 23 from .src import event_pb2
     24 from .src import summary_pb2
     25 from .event_file_writer import EventFileWriter

ImportError: cannot import name event_pb2

Windows PyPI support and installer script test

As we have Win users, I'm going to:

  • Test the installer.sh script under Windows.
  • Try to build PyPI for Windows.
  • Possibility to provide an anaconda version.

As I haven't used windows for a while, it might take some time. Anyone could help and contribute in this direction?

Problems with building pip package

Hello,
when I'm building tensorboard as pip package pip package, I receive:
build_pip_package.sh: 20: build_pip_package.sh: Syntax error: "(" unexpected

OS: Ubuntu 16.04
Python 2.7

StringIO issue when using python2

In the summary.py

"from six import StringIO" is not working for python 2.7.
So I got this error,
File "/home/hz138/anaconda2/lib/python2.7/site-packages/tensorboard/summary.py", line 186, in make_image
output = StringIO.StringIO()
AttributeError: class StringIO has no attribute 'StringIO'

ImportError: _pywrap_tensorflow.so: Symbol not found: _PyBytes_AsString

I've tried to install tensorboard on Python 3.6 (macOS Sierra 10.12.6) both using pip3 install tensorboard or build from source. In both cases I'm getting this error:

> tensorboard --logdir=/tmp/tb
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/tensorboard/tensorboard.py", line 32, in <module>
    from tensorflow.python.summary import event_file_inspector as efi
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/summary/event_file_inspector.py", line 122, in <module>
    from tensorflow.python.platform import gfile
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/platform/gfile.py", line 22, in <module>
    from tensorflow.python.lib.io.file_io import copy as Copy
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/lib/io/file_io.py", line 27, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow.so, 2): Symbol not found: _PyBytes_AsString
  Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow.so
  Expected in: flat namespace
 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow.so

Did I miss something?

Related issue on stackoverflow (not resolved): https://stackoverflow.com/questions/44895394/cant-run-tensorboard-because-of-symbol-not-found-pybytes-asstring

Unable to build with sources

Hi, I am really enjoy using the standalone tensorboard tool!
However, I found that the latest master branch of the tensorflow library does not contain "tensorflow/tensorboard", thus when I run "installer.sh", it fails to compile.

Since the master branch is quite unstable and prone to change, I suggest that cloning a specific stable version of tensorflow instead of the latest version.
Say the stable version is r1.2, it could be easily fixed by changing the line
git clone https://github.com/tensorflow/tensorflow
with
git clone -b r1.2 https://github.com/tensorflow/tensorflow.

Seeing the situation again, it seems that the separation of tensorboard from tensorflow is permanant, thus it'd be better fixing the installation script to run with the separated tensorboard repo.

Release date for tensorboard in pypi

Hi,
Thanks for the amazing work,

Do you have an expected release date for this package in pypi ? It's hard to recommend this package to other people for now since it has to be built from source, which is not very easy.

There might be a bug for users installing tensorboard via anaconda

I am using Anaconda as my python environment. To install tensorboard, I simply followed the instruction

pip install tensorboard

However when I run

$ tensorboard --logdir=path/to/logs

I get

  File "/home/haohe/anaconda2/bin/tensorboard", line 161, in <module>
    Main()
  File "/home/haohe/anaconda2/bin/tensorboard", line 111, in Main
    module_space = FindModuleSpace()
  File "/home/haohe/anaconda2/bin/tensorboard", line 92, in FindModuleSpace
    sys.argv[0])

Then I come to stackoverflow, find very useful information on (http://stackoverflow.com/questions/42600499/tensorboard-cannot-find-runfiles-directory-error/43174814)

By the recommandation there, I run

 find /home/haohe/anaconda2/ -name '*runfiles*'

which returns,

/home/haohe/anaconda2/lib/python2.7/site-packages/tensorboard/tensorboard.runfiles

Then I come to the /home/haohe/anaconda2/bin folder to check the tensorboard script, where I looked into the FindModuleSpace function and get

def FindModuleSpace():
  # Follow symlinks, looking for my module space
  stub_filename = os.path.abspath(sys.argv[0])
  while True:
    # Found it?
    module_space = stub_filename + '.runfiles'
    if os.path.isdir(module_space):
      break
    package_path = site.getsitepackages()
    # In case this instance is a string
    if not isinstance(package_path, list):
      package_path = [package_path]
    user_path = site.getusersitepackages()
    if not isinstance(user_path, list):
      user_path = [user_path]
    package_path.extend(user_path)
    for mod in package_path:
      module_space = mod + '/tensorboard/tensorboard' + '.runfiles'
    if os.path.isdir(module_space):
      return module_space

    runfiles_pattern = "(.*\.runfiles)/.*"
    if IsWindows():
      runfiles_pattern = "(.*\.runfiles)\\.*"
    matchobj = re.match(runfiles_pattern, os.path.abspath(sys.argv[0]))
    if matchobj:
      module_space = matchobj.group(1)
      break

    raise AssertionError('Cannot find .runfiles directory for %s' %
                         sys.argv[0])
  return module_space

I notice one weird thing is this piece of code,

    for mod in package_path:
      module_space = mod + '/tensorboard/tensorboard' + '.runfiles'
    if os.path.isdir(module_space):
      return module_space

It seems the only the last item in package_path will be checked. Thus I changed the code into

    #print package_path # to check the package_path
    for mod in package_path:
      module_space = mod + '/tensorboard/tensorboard' + '.runfiles'
      if os.path.isdir(module_space):
        return module_space

Then I make it work.

So I really would like to know, do I miss something when I install tensorboard or it might be something need to be fixed.

Thanks for your patience to read my experience.

why pending at the time cloning tensorboard-lite?

@zihaolucky ,running sh installer.sh keeps pending, i do not know whether it is normal, like

protoc tensorboard/src/*.proto --python_out=python/
Submodule 'tensorboard-lite' (https://github.com/zihaolucky/tensorboard-lite.git) registered for path 'tensorboard-lite/tensorboard-lite'
Cloning into '$HOME/tensorboard/tensorboard-lite'...

sh installer.sh failed(ERROR: no such package 'tensorflow/tensorboard': BUILD file not found on package path.)

ubuntu14.04

I follow the readme to install tensorboard for mxnet, after I run "sh installer.sh", I get an error:
ERROR: no such package 'tensorflow/tensorboard': BUILD file not found on package path.
INFO: Elapsed time: 0.339s
cp: cannot create directory ‘bazel-bin/tensorflow/tools/’: No such file or directory
bash: bazel-bin/tensorflow/tools/pip_package/build_pip_package.sh: No such file or directory
Requirement 'python/dist/*.whl' looks like a filename, but the file does not exist
%2A.whl is not a valid wheel filename.

I didn't use tensorflow in the past, and I can't find what's wrong with it, please help me, thanks! ^_^

All values are at 0 epoch

Hello,

I just use mx.contrib.tensorboard.LogMetricsCallback() in the model.fit(batch_end_callback=..., eval_batch_end_call_back=...)

It generates the log file, but when I run tensorboard --logdir=...,

it generates a figure like follows:

screen shot 2017-06-15 at 11 33 59 am

Any ideas what I did wrong?

Error after installation via pip

I have recently attempted to install tensorboard via pip as detailed in the README.md. The installation was deemed successful however when I try to run tensorboard after the installation, I keep on receiving an import/ undefined symbol error as seen below.

`Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/tensorboard/tensorboard.py", line 32, in <module>
    from tensorflow.python.summary import event_file_inspector as efi
  File "/usr/local/lib/python3.5/dist-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/summary/event_file_inspector.py", line 122, in <module>
    from tensorflow.python.platform import gfile
  File "/usr/local/lib/python3.5/dist-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/platform/gfile.py", line 22, in <module>
    from tensorflow.python.lib.io.file_io import copy as Copy
  File "/usr/local/lib/python3.5/dist-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/lib/io/file_io.py", line 27, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/usr/local/lib/python3.5/dist-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "/usr/local/lib/python3.5/dist-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: /usr/local/lib/python3.5/dist-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow.so: undefined symbol: PyBytes_AsStringAndSize

`
I am using Version: 1.0.0a6

Have I missed something in the installation process?
What can I do to fix this?

Thanks

Mac failed to build tensorboard (Duplicated key "define" when creating dictionary)

I used Anaconda as my python environment and simply followed the instruction 'Prepare environment for Mac OS X'
Then, I met error as follows

File "/Users/bowen/workspace/tensorboard-distro/tensorboard-build/tensorflow/tensorflow/core/kernels/BUILD", line 53
		config_setting(name = "xsmm_backward", values = {..."})
	File "/Users/bowen/workspace/tensorboard-distro/tensorboard-build/tensorflow/tensorflow/core/kernels/BUILD", line 58, in config_setting
		{"define": "tensorflow_xsmm=1", "define": "tensorflow_xsmm_backward=1"}
Duplicated key "define" when creating dictionary

My system and other library is listed:
System: macOs Sierra 10.12.6
bazel 0.6.1;
protobuf 3.4.0

I wonder whether there is any problem on my tensorflow or bazel version.
Thank you for your time to read my experience.

sh installer.sh failed

hi, guys
I am trying to test the tutorial. However, when i run sh installer.sh, an error ocurred

INFO: Elapsed time: 366.295s, Critical Path: 291.77s
sh: bazel-bin/tensorflow/tools/pip_package/build_pip_package.sh: No such  or directory
Requirement 'python/dist/*.whl' looks like a filename, but the file does exist
*.whl is not a valid wheel filename.
Now you can remove tensorflow with rm -rf tensorflow

System Version: CentOS 7.1

proto file

The issue:
I have been trying to run the "import tensorflow" command in python. But, that runs into an error stating that the command "couldn't build proto file into descriptor pool."

The platform:
Python 3.6.8, 64 bit, on pyenv virtual environment. Ubuntu 18.10.
CUDA 9.1 CUDNN 7.1

Code:
`conda create -n tf-n-gpu # other versions tested were: 2.0.0.a, 1.14. & 1.15

conda activate tf-n-gpu

pip install tf-nightly-gpu --user

pip install tf-hub-nightly--user

pip install absl-py --user

python

import tensorflow `

ErrorType:
`Invalid proto descriptor for file "tensorboard/compat/proto/resource_handle.proto":

tensorboard.ResourceHandleProto.device: "tensorboard.ResourceHandleProto.device" is already defined in file "tensorboard/src/resource_handle.proto".
tensorboard.ResourceHandleProto.container: "tensorboard.ResourceHandleProto.container" is already defined in file "tensorboard/src/resource_handle.proto".
tensorboard.ResourceHandleProto.name: "tensorboard.ResourceHandleProto.name" is already defined in file "tensorboard/src/resource_handle.proto".
tensorboard.ResourceHandleProto.hash_code: "tensorboard.ResourceHandleProto.hash_code" is already defined in file "tensorboard/src/resource_handle.proto".
tensorboard.ResourceHandleProto.maybe_type_name: "tensorboard.ResourceHandleProto.maybe_type_name" is already defined in file "tensorboard/src/resource_handle.proto".
tensorboard.ResourceHandleProto: "tensorboard.ResourceHandleProto" is already defined in file "tensorboard/src/resource_handle.proto".`

Action already taken:

`pip uninstall protobuf

pip install protobuf==3.4.0 # other versions tested were: 3.5.1, and also pip install protobuf== no-binary protobuf protobuf

Error from pip install

Hi, so recently trying to install from pip install when I try running tensorboard from the command line I get:

RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/tensorboard/tensorboard.py", line 32, in <module>
    from tensorflow.python.summary import event_file_inspector as efi
  File "/opt/anaconda3/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/summary/event_file_inspector.py", line 122, in <module>
    from tensorflow.python.platform import gfile
  File "/opt/anaconda3/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/platform/gfile.py", line 22, in <module>
    from tensorflow.python.lib.io.file_io import copy as Copy
  File "/opt/anaconda3/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/lib/io/file_io.py", line 27, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/opt/anaconda3/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "/opt/anaconda3/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
  File "/opt/anaconda3/lib/python3.6/imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "/opt/anaconda3/lib/python3.6/imp.py", line 342, in load_dynamic
    return _load(spec)
SystemError: initialization of _pywrap_tensorflow raised unreported exception

Which version of numpy is used in the pypi package for tensorboard?

add a image with summary for showing in tensorboard

Hi,
for add a image to graph for showing in tensorboard , i used below code. but the tensorflow error that :"TypeError: Parameter to MergeFrom() must be instance of same class: expected Summary got Tensor. for field Event.summary"

the code :
<< writer =tf.summary.FileWriter('C:\Program Files\python3.5\logs',graph=tf.get_default_graph())
<v
<<tf.Tensor 'Slice_2:0' shape=(1, 152, 138, 1) dtype=float32>
<<imgsumarry=tf.summary.image('image', v, 3 ,collections=None)
<imgsumarry
<<tf.Tensor 'image_2:0' shape=() dtype=string>
<< writer.add_summary(imgsumarry)

full error:

Traceback (most recent call last):
File "C:\Program Files\python3.5\python-3.5.3.amd64\lib\site-packages\google\protobuf\internal\python_message.py", line 516, in init
copy.MergeFrom(new_val)
File "C:\Program Files\python3.5\python-3.5.3.amd64\lib\site-packages\google\protobuf\internal\python_message.py", line 1208, in MergeFrom
'expected %s got %s.' % (cls.name, msg.class.name))
TypeError: Parameter to MergeFrom() must be instance of same class: expected Summary got Tensor.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "<pyshell#579>", line 1, in
writer.add_summary(imgsumarry)
File "C:\Program Files\python3.5\python-3.5.3.amd64\lib\site-packages\tensorflow\python\summary\writer\writer.py", line 113, in add_summary
event = event_pb2.Event(summary=summary)
File "C:\Program Files\python3.5\python-3.5.3.amd64\lib\site-packages\google\protobuf\internal\python_message.py", line 518, in init
_ReraiseTypeErrorWithFieldName(message_descriptor.name, field_name)
File "C:\Program Files\python3.5\python-3.5.3.amd64\lib\site-packages\google\protobuf\internal\python_message.py", line 446, in _ReraiseTypeErrorWithFieldName
six.reraise(type(exc), exc, sys.exc_info()[2])
File "C:\Program Files\python3.5\python-3.5.3.amd64\lib\site-packages\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "C:\Program Files\python3.5\python-3.5.3.amd64\lib\site-packages\google\protobuf\internal\python_message.py", line 516, in init
copy.MergeFrom(new_val)
File "C:\Program Files\python3.5\python-3.5.3.amd64\lib\site-packages\google\protobuf\internal\python_message.py", line 1208, in MergeFrom
'expected %s got %s.' % (cls.name, msg.class.name))
TypeError: Parameter to MergeFrom() must be instance of same class: expected Summary got Tensor. for field Event.summary

Merge into MXNet

@piiswrong

Any works/advice to do before we merge this into MXNet? I was going to write a script to auto-build the wheel file using Travis-CI and user could install TensorBoard simply using pip install tensorboard, just like TF does. Otherwise, the user has to install bazel and it makes MXNet's installation too heavy?

problem with installing tensorboard via virtualenv

Hi, this is a nice project and I'm trying to use it.

The issue I'm experiencing is probably related to #36.

After I did pip install tensorboard in a virtual enviroment, tensorboard failed to launch. I got the following error:

Traceback (most recent call last):
  File "/Users/taolei/dlenv/bin/tensorboard", line 186, in <module>
    Main()
  File "/Users/taolei/dlenv/bin/tensorboard", line 135, in Main
    module_space = FindModuleSpace()
  File "/Users/taolei/dlenv/bin/tensorboard", line 83, in FindModuleSpace
    package_path = site.getsitepackages()
AttributeError: 'module' object has no attribute 'getsitepackages'

I tried to google about it and found that this is due to a open bug with Python 2.7 and vistualenv. See this:
Python 2.7 isn't compatible with site.py.
issues with getsitepackages under a virtualenv

I'm wondering if there is a possible fix (or a workaround).

Thanks!

How to install the tensorboard server?

Hi,

I was assuming that when I've installed through PyPI the tensorboard it will also install the tensorboard server app. However, is this correct? Currently I get:

$tensorboard --logdir=logs
Traceback (most recent call last):
  File "/opt/anaconda3/bin/tensorboard", line 160, in <module>
    Main()
  File "/opt/anaconda3/bin/tensorboard", line 110, in Main
    module_space = FindModuleSpace()
  File "/opt/anaconda3/bin/tensorboard", line 91, in FindModuleSpace
    sys.argv[0])
AssertionError: Cannot find .runfiles directory for /opt/anaconda3/bin/tensorboard

This is on Ubuntu 16.04 with Anaconda 4.2.13 and python 3.6

Merge?

Do you guys have plans on implementing the merge summaries bit?

Simple usage example

Hi, thanks for a very nice work!

After looking for some time at your project I realized that it is completely independent from either Tensorflow or Mxnet, one can use it with Theano (like in my case), Pytorch or even standalone python scripts.

I propose to add an example which demonstrates how to use it in the simplest way, something like:

import tensorboard
from tensorboard import summary
train_writer = tensorboard.FileWriter('./log/train')
test_writer = tensorboard.FileWriter('./log/test')
for i in range(10):
    train_writer.add_summary(summary.scalar('accuaracy', i ** 2), global_step=i)
    test_writer.add_summary(summary.scalar('accuaracy', (i ** 2) * .9), global_step=i)

Let me know what you think, I can create a PR.

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.