Skip to content
This repository has been archived by the owner on Mar 25, 2020. It is now read-only.

Add Windows Support to tensorboard #27

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

ahmedezzat85
Copy link

No description provided.

README.md Outdated

```bash
C:\>cd tensorboard
C:\tensorboard>bash installer.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo?

cd tensorflow

# run configuration.
bash configure --prefix=/mingw
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why prefix here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This the only thing worked with me. Without this, I got bazel build errors.
See Reference

@@ -183,7 +183,7 @@ def image(tag, tensor):
def make_image(tensor, height, width, channel):
"""Convert an numpy representation image to Image protobuf"""
image = Image.fromarray(tensor)
output = StringIO.StringIO()
output = StringIO() # This is working for python 2.7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change this? Any error in the origin code?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use python 2.7 and it's ok.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am using Anaconda python 2.7. I got errors with this error AttributeError: class StringIO has no attribute 'StringIO'
When I made the modification, it is working.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me test this in my env, thanks.

@zihaolucky
Copy link
Member

Is the binary and runfiles necessary? I think these should be generated and handled in installer_windows.sh

@ahmedezzat85
Copy link
Author

ahmedezzat85 commented Mar 30, 2017

@zihaolucky
After build is done, I got this error message (It is just for the pip package build)
Thu Mar 30 12:42:01 EST 2017 : === Using tmpdir: ../python/tensorboard/ Unzipping simple_console_for_windows.zip to create runfiles tree... unzip: cannot find or open ./bazel-bin/tensorflow/tools/pip_package/simple_console_for_windows.zip, ./bazel-bin/tensorflow/tools/pip_package/simple_console_for_windows.zip.zip or ./bazel-bin/tensorflow/tools/pip_package/simple_console_for_windows.zip.ZIP. Requirement 'python/dist/*.whl' looks like a filename, but the file does not exist *.whl is not a valid wheel filename. Now you can remove tensorflow with rm -rf tensorflow
I can install tensorboard manually as follows:

  1. Manually copy both tensorboard and tensorboard.runfiles under python/tensorboard (Can be added to the script).
  2. Run python setup.py install from python directory.
  3. After the package is installed, the python/tensorboard/src directory is not copied to the package installation. It must be manually copied.

So, I added the binary files explicitly for reference on github. If someone needs to verify the installation (without going the whole path).

cp -r ../tools/* bazel-bin/tensorflow/tools/

# get .whl file in python/dist/
bash bazel-bin/tensorflow/tools/pip_package/build_pip_package.sh ../python/dist/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In build_pip_package.sh, .runfiles in Windows are placed in a different location. But I forgot to handle this in tensorboard-binary.patch, could you take a look? Just take a look at the tensorboard binary and try to handle runfiles location in FindModuleSpace.

@zihaolucky
Copy link
Member

@ahmedezzateasa Let me check the latest build_pip_package in TensorFlow.

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

Successfully merging this pull request may close these issues.

2 participants