[英]launch tensorboard in colab
i try launch tensorboard on colab, my code:我尝试在 colab 上启动 tensorboard,我的代码:
LOG_DIR = model_dir
get_ipython().system_raw(
'tensorboard --logdir {} --host 0.0.0.0 --port 6060 &'
.format(LOG_DIR)
)
get_ipython().system_raw('./ngrok http 6060 &')
! curl -s http://localhost:4040/api/tunnels | python3 -c \
"import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])"
two days ago everything worked, but now such an error:两天前一切正常,但现在出现这样的错误:
The error linked suggests the port you're using is 6006
, but the code example you gave above has the port as 6060
.链接的错误表明您使用的端口是6006
,但您上面给出的代码示例的端口是6060
。 So may just be a typo there.所以可能只是一个错字。
It's also possible you want a TCP tunnel, not an HTTP tunnel.您也可能需要 TCP 隧道,而不是 HTTP 隧道。
In either case, might I suggest trying something like pyngrok
to programmatically manage your ngrok
tunnel for you?在这两种情况下,我是否建议您尝试使用pyngrok
类的pyngrok
以编程方式为您管理您的ngrok
隧道? Full disclosure, I am the developer of it.完全公开,我是它的开发者。 Here are the docs if you're interest.如果您有兴趣,这里是文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.