当前位置:网站首页>Remote access to tensorboard
Remote access to tensorboard
2022-06-10 11:38:00 【MallocLu】
List of articles
Application scenarios
The code runs on the remote server , We want to get its running status ( For example, current losses 、 Accuracy, etc )
Method 1 : Use SSH Connect , from terminal Output understanding of ( If SSH Broken line or network , The program being executed will stop , Reconnection requires a rerun , We can match tmux To guarantee SSH The disconnection procedure does not terminate )
Method 2 : Write the running data in the program Tensorboard, Use SSH The tunnel function of maps the port of the remote host to the local port . Use tmux Start two session, One session Middle run program , the other one session Start in Tensorboard.
Method 1 demonstration
# test.py
import time
for i in range(100000):
time.sleep(1)
print(i)
- Use XShell Connect to remote host
- tmux new -s test, Create a new one called test Of session
- python test.py Execution procedure , It continuously outputs incrementing integers
Method 2 demonstration
# test.py
from torch.utils.tensorboard import SummaryWriter
import time
writer = SummaryWriter("logs")
for i in range(100000):
time.sleep(1)
print(i)
writer.add_scalar("tttt", i ** 2 + 1, i)
writer.close()
stay XShell The left session manager window On the current active session Right click -> attribute -> Connect ->SSH-> Tunnel -> add to
The figure below Red box You can choose the port number in

tmux new -s test Create a new one called test Of session
python test.py Execution procedure , It will continue to Tensorboard Write an incrementing integer
ctrl+b+d Exit the current session without terminating the running program test.py
tmux new -s tb Create a new one tb Of session
Execution instruction tensorboard --logdir=logs --port=<port_name> start-up Tensorboard
1) stay logs Execute the command in the path where the folder is located , Otherwise it would be logs Change to relative path or absolute path
2) --port=<port_name> by 1 The port number in the red box , If you use 6006, Then it can be abbreviated as tensorboard --logdir=logs
ctrl+b+d Exit the current session without terminating the running Tensorboard
In local browser Input http://localhost:<port_name> or http://127.0.0.1:<port_name> visit , The page will not refresh automatically , Get the latest data through manual refresh ( Upper right corner Tensorboard Refresh / The browser in the upper left corner is refreshed )
边栏推荐
- Google Earth engine (GEE) - country identifier grid dataset
- Essential 5 determinants of linear algebra
- OAuth2学习中的一些高频问题的QA
- High performance computing (2) -- a ten thousand foot tall building rises from the ground
- 面经题目01
- [PaperNote] Web3 Direction
- 定时刷数据库的数据,并只同步被修改的字段
- Day 2 linked list (simple)
- MySQL数据类型
- 十、状态机模型的应用(细胞自动机;gdb/rr/perf;代码验证工具)
猜你喜欢
随机推荐
【Question】what‘s the scenario of aliasing a class interface
软件测试基础
source observable 发生错误之后会直接进入到catchError operator 而不是按照pipe里面的顺序处理之后再进入catchError
kubernetes常用命令-1-命令补全
Digital supply chain collaboration system for digital commerce cloud communication industry: empowering communication enterprises to improve supply business and enhance market competitiveness
The essence of linear algebra 4 matrix multiplication and linear compound transformation
PyTorch的参数固定以及detach clone
【万人独木桥】那个夏天—后高考生活该如何安排?
从 0 开始构建研发高效能全栈式团队
OAuth2学习中的一些高频问题的QA
如何配置多数据源
How zoom closes the microphone when joining a meeting
【Question】rxjs/operator takeWhile vs takeUntil
时间轴、物流信息。你根本不需要StepView
CLIP使用
Unit test based on junit4
Transfomer各组件与Pytorch
Essential 5 determinants of linear algebra
How to compile product marketing plan
大型项目综合实训









