Last active
December 22, 2018 12:32
-
-
Save randName/e2493d06e7c94ca753077e878482dad5 to your computer and use it in GitHub Desktop.
TensorBoard_Base.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"name": "TensorBoard_Base.ipynb", | |
"version": "0.3.2", | |
"provenance": [], | |
"collapsed_sections": [], | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
}, | |
"accelerator": "GPU" | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/randName/e2493d06e7c94ca753077e878482dad5/tensorboard_base.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"metadata": { | |
"id": "NarTKY1XiMKw", | |
"colab_type": "code", | |
"cellView": "form", | |
"colab": {} | |
}, | |
"cell_type": "code", | |
"source": [ | |
"#@title Download ngrok (on fresh instance)\n", | |
"! wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip\n", | |
"! unzip ngrok-stable-linux-amd64.zip" | |
], | |
"execution_count": 0, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"id": "ecF5cjhuFDpz", | |
"colab_type": "code", | |
"colab": {} | |
}, | |
"cell_type": "code", | |
"source": [ | |
"LOG_DIR = 'results'" | |
], | |
"execution_count": 0, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"id": "cBz2LGy5i_VN", | |
"colab_type": "code", | |
"cellView": "form", | |
"colab": {} | |
}, | |
"cell_type": "code", | |
"source": [ | |
"#@title Start TensorBoard\n", | |
"%%sh -s \"$LOG_DIR\" --bg --out tensorboard_out --err tensorboard_err\n", | |
"[ -d $1 ] || mkdir $1\n", | |
"tensorboard --logdir $1" | |
], | |
"execution_count": 0, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"id": "Ciq5iugUmN63", | |
"colab_type": "code", | |
"cellView": "form", | |
"colab": {} | |
}, | |
"cell_type": "code", | |
"source": [ | |
"#@title Start ngrok\n", | |
"%%sh --bg --out ngrok_out --err ngrok_err\n", | |
"./ngrok http --log=stdout --inspect=false 6006" | |
], | |
"execution_count": 0, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"id": "RJJnOq5S1Pma", | |
"colab_type": "code", | |
"colab": {}, | |
"cellView": "form" | |
}, | |
"cell_type": "code", | |
"source": [ | |
"#@title Show connection details\n", | |
"! curl -s http://localhost:4040/api/tunnels/command_line | awk -F \"\\\"\" '{print $12}'\n", | |
"tensorboard_err.readline().decode()" | |
], | |
"execution_count": 0, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"id": "Sw3EI9qa34s3", | |
"colab_type": "code", | |
"colab": {} | |
}, | |
"cell_type": "code", | |
"source": [ | |
"" | |
], | |
"execution_count": 0, | |
"outputs": [] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment