microsoft / vs-tools-for-ai

Visual Studio Tools for AI is a free Visual Studio extension to build, test, and deploy deep learning / AI solutions. It seamlessly integrates with Azure Machine Learning for robust experimentation capabilities, including but not limited to submitting data preparation and model training jobs transparently to different compute targets. Additionally, it provides support for custom metrics and run history tracking, enabling data science reproducibility and auditing. Enterprise ready collaboration, allow to securely work on project with other people.
http://aka.ms/vstoolsforai
352 stars 80 forks source link

TensorBoard Opens to unreacheachable WebPage #4

Closed etfong closed 6 years ago

etfong commented 6 years ago

Webpage is unreachable when running TensorBoard (http://127.0.0.1:1025)

linmajia commented 6 years ago

Hi etfong,

Thanks for your feedback! I guess that your TensorBoard log files are not on drive C.

When creating a TensorBoard process, we pass the full path of the log directory to TensorBoard. However, TensorBoard uses a colon as a separator between the optional "run name" and the path in the --logdir argument. So if your log directory is e.g. "d:\log", then TensorBoard will interpret this string as two parts due to the ":". The run name is "d", and the log directory is "\log". Since TensorBoard is launched from VS, the drive letter of the default working directory is "C" and then TensorBoard cannot find log files.

As a workaround, please put your projects and log files on drive C. We will fix the issue soon.

linmajia commented 6 years ago

Fixed in version 0.3.3.0.

Thanks.

XUEZIJIAN commented 6 years ago

I have the same problem.(http://msi:1025) And put the projects and log files on drive C does not work. AI Tools 0.4.1.664470 Visual Studio 2017 15.7.5

linmajia commented 6 years ago

@XUEZIJIAN , thank you very much for the feedback.

Did you see a TensorBoard process is launched? If not, please open a CMD terminal, go to the log directory, and run "tensorboard --logdir=." to check if errors happen.

Which version of TensorFlow are you using? I suggest that you install TensorFlow 1.5.0 on Windows and try it again.

Thanks.

XUEZIJIAN commented 6 years ago

@linmajia , Sorry to reply late. I use tensorflow1.6. Actually it works fine two month ago(by right click in Visual Studio). The process is just flashed. I can't see the content. After about 10s, the browser will open automatically.(msi:1025/) And I don't know how to use cmd in VS. But I tried several:

PS D:> python -m tensorboard --logdir=logs/ C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\python.exe: No module named tensorboard.main; 'tensorboard' is a package and cannot be directly executed

PS D:> tensorboard --logdir=logs/ Fatal error in launcher: Unable to create process using '""c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\python.exe" "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\Scripts\tensorboard.exe" --logdir=logs/'

PS D:> python -m tensorflow.tensorboard --logdir=logs/ C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\h5py__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\python.exe: No module named tensorflow.tensorboard

Thank you very much.

linmajia commented 6 years ago

@XUEZIJIAN , thanks for the runtime information.

It seems that you are using Anaconda shipped with VS 2017. Did you install other Python environments too? First, you need to confirm that TensorFlow 1.6 and TensorBoard 1.6 are really installed within this Anaconda environment. Then, you open a CMD terminal and run: "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\Scripts\tensorboard.exe" --logdir=logs/ "

XUEZIJIAN commented 6 years ago

@linmajia Thank you very much for your patience. They're in the same environment. but the tensorboard is 1.10 now.

here's the result C:\Users\XZJ> "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\Scripts\tensorboard.exe" --logdir=D:/logs Fatal error in launcher: Unable to create process using '""c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\python.exe" "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\Scripts\tensorboard.exe" --logdir=D:/logs'

It looks like still I didn't use CMD correctly? Vs can get a address at least.

linmajia commented 6 years ago

@XUEZIJIAN , did you install TensorFlow/TensorBoard directly into the Anaconda master environment? Seems that TensorFlow/TensorBoard are broken. I suggest that you uninstall and then reinstall them:

  1. Open a CMD terminal with Administrative permission.
  2. "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\python.exe" -m pip uninstall -y -q tensorboard tensorflow
  3. "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\python.exe" -m pip install tensorflow==1.6

If you have NVidia GPU, you can replace "tensorflow" with "tensorflow-gpu" to install the GPU version.

XUEZIJIAN commented 6 years ago

@linmajia ,yes and I just reinstalled them according to your guidance. Now I have tensorflow-gpu1.6 and tensorboard1.6. But still have the problem. I wonder why it can run and get the address by Visual Studio tool, and why my port is not 6006. Thank you.

linmajia commented 6 years ago

@XUEZIJIAN , Tools for AI just launches TensorBoard using a random available port to avoid port confliction. The issue is that your TensorBoard in Anaconda is broken.

My suggestion is that you install Python from www.python.org, set it as the default Python environment in VS and install TensorFlow. You can refer here