Tensorboard 永远加载/不在 vs 代码中加载,也不在终端中加载 [英] Tensorboard loading forever/ not loading in vs code nor in terminal

查看:111
本文介绍了Tensorboard 永远加载/不在 vs 代码中加载,也不在终端中加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目标:我想启动 tensorboard 仪表板,并从那里生成的 tfevents 文件中的标量选项卡中可视化损失/指标.

设置:在 conda 环境中,使用 python=3.8.5,只安装了这些包(我创建了一个新环境来测试问题,初始代码环境使用 python 3.9):

  • conda install -c anaconda jupyter
  • conda install ipykernel
  • conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
  • conda install -c conda-forge 张量板
  • pip install torch-tb-profiler

结果:我在子文件夹 runs 中有一个已经生成的 tfevents 文件.当我使用 vscode 时,现在 vscode 集成的 tensorboard 正在加载,直到超时.首先,我认为这只是 vs 代码的问题...

但我尝试通过集成终端(cmd 提示符)使用以下命令启动 tensorboard:tensorboard --logdir=runstensorboard --logdir=C:workspace\runs"--host localhost --port 6006.

无论是在 vscode 的交互窗口中还是在 http://localhost:6006/ 上,在所有情况下 tensorboard 只打开橙色标题,空白页面(见下图),永久加载...

我在这里做错了什么?它类似于

解决方案

尝试运行 pip uninstall torch-tb-profiler 来卸载插件.

然后您应该能够运行 tensorboard --logdir [日志目录名称] 来运行 tensorboard.

Goal: I want to launch the tensorboard dashboard and visualize the loss/metrics in the scalars tab from a generated tfevents file there.

Setup: In a conda environment, with python=3.8.5, with only these packages installed (I created a fresh environment to test the issue, initial code environment used python 3.9):

  • conda install -c anaconda jupyter
  • conda install ipykernel
  • conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
  • conda install -c conda-forge tensorboard
  • pip install torch-tb-profiler

Outcome: I have an already generated tfevents file in the subfolder runs. When I use vscode, the now vscode integrated tensorboard is loading until timeout. First, I thought its an issue with vs code only...

But I tried to launch tensorboard via the integrated terminal (cmd prompt) with: tensorboard --logdir=runs or tensorboard --logdir="C:workspace\runs" --host localhost --port 6006.

Whether in the interactive window in vscode or on http://localhost:6006/, in all cases tensorboard only opens with the orange header, with a blank page (see image below), loading eternally...

What am I doing wrong here? Its similar to this, but the solution there is not helpful. Thanks a lot!

EDIT: Thanks to @LzZ, it now magically works even with the above old environment when using the integrated terminal commands but the launch via the command palette still doesnt work in vscode

EDIT2: Somehow its back to NOT working again in no environment. Something must have unclogged everything yesterday. Now its back to not working...

EDIT3: Update: It now works when first calling tensorboard --logdir dir in the integrated terminal. Only afterwards, the %load_ext tensorboard and %tensorboard --logdir dir also work in vscode itself.

解决方案

Try running pip uninstall torch-tb-profiler to uninstall the plugin.

You should then be able to run tensorboard --logdir [name of log directory] to get tensorboard running.

这篇关于Tensorboard 永远加载/不在 vs 代码中加载,也不在终端中加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆