This time, I mainly share how to use the visdom visualization tool to map the data saved on the server to the local browser.
install visdom
pip install visdom
1. The server is running
The default port to start visdom is 8097
python -m visdom.server
Set the port to start visdom, for example, set the port to 8099
python -m visdom.server -p 8099
2. Map the server port to the local host ( choose one of the following )
2.1 Command line mode
ssh -L 8097:127.0.0.1:8099 -p <port> [email protected]
In the above command, the first "8097" indicates the port number that is locally mapped to the target server port, and "8099" indicates the port number that needs to be mapped to the local host.
Finally -p <port> [email protected] means ssh connection
2.2 finalshell tools
Through the "tunnel" function of the finalshell tool, the port mapping in 2.1 can be realized, and the configuration is as follows:
① Open the tunnel settings through "Edit-Tunnel-Add"
② Configure the corresponding content
Among them, "listening port" and "binding ip" represent the local host settings, and the port can be customized. Finally, this content will be input into the browser (http://127.0.0.1:8097) to visualize the server data.
"Target address" and "Target port" indicate the server configuration, because the server configuration has been completed before, here we can use 127.0.0.1, and the port indicates the port where visdom runs on the server. (The server is used by multiple people, it is recommended to set a specific port by yourself)
Note: Be sure to open the new finalshell link after you finish configuring ! ! ! !
3. Localhost visualization
Enter http://127.0.0.1:8097 in the local browser to realize visualization.