graykode

(refactor) remove output in google colab

......@@ -3,7 +3,7 @@
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "commit-autosuggestions.ipynb",
"name": "commit_autosuggestions.ipynb",
"provenance": [],
"collapsed_sections": [],
"toc_visible": true
......@@ -124,9 +124,9 @@
},
"source": [
"# Paste your authtoken here in quotes\n",
"authtoken = \"21KfrFEW1BptdPPM4SS_7s1Z4HwozyXX9NP2fHC12\""
"authtoken = \"1kskZgJ8KpCRvYnzSF63AcodvBr_4RMXxFo4Sa2qLrRaKjhJW\""
],
"execution_count": null,
"execution_count": 5,
"outputs": []
},
{
......@@ -161,7 +161,7 @@
"local_in_port = 5000\n",
"local_out_port = 5000"
],
"execution_count": null,
"execution_count": 6,
"outputs": []
},
{
......@@ -187,26 +187,14 @@
"with open('ngrok.conf', 'w') as f:\n",
" f.write(config)"
],
"execution_count": 1,
"outputs": [
{
"output_type": "error",
"ename": "NameError",
"evalue": "name 'authtoken' is not defined",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-1-7305b3f78ded>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[0mconfig\u001b[0m \u001b[1;33m=\u001b[0m\u001b[0;31m\\\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m f\"\"\"\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mauthtoken\u001b[0m\u001b[1;33m:\u001b[0m \u001b[1;33m{\u001b[0m\u001b[0mauthtoken\u001b[0m\u001b[1;33m}\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4\u001b[0m \u001b[0mregion\u001b[0m\u001b[1;33m:\u001b[0m \u001b[1;33m{\u001b[0m\u001b[0mregion\u001b[0m\u001b[1;33m}\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[0mconsole_ui\u001b[0m\u001b[1;33m:\u001b[0m \u001b[1;32mFalse\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mNameError\u001b[0m: name 'authtoken' is not defined"
]
}
]
"execution_count": 7,
"outputs": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"metadata": {
"id": "5r252w0r0Z0o"
},
"source": [
"from subprocess import Popen, PIPE\n",
"import shlex\n",
......@@ -240,7 +228,9 @@
" print(f'unknown tunnel: {tunnel[\"name\"]}')\n",
"\n",
" return in_addr, out_addr"
]
],
"execution_count": 9,
"outputs": []
},
{
"cell_type": "code",
......@@ -255,17 +245,13 @@
"ps = Popen('./scripts/open_tunnel_ngrok.sh', stdout=PIPE, stderr=PIPE)\n",
"time.sleep(3)"
],
"execution_count": null,
"execution_count": 10,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "pJgdFr0Fdjoq",
"outputId": "3948f70b-d4f3-4ed8-a864-fe5c6df50809",
"colab": {
"base_uri": "https://localhost:8080/"
}
"id": "pJgdFr0Fdjoq"
},
"source": [
"# Get tunnel addresses\n",
......@@ -277,16 +263,7 @@
" print(\"Something went wrong, reopen the tunnel\")"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Opening tunnel\n",
"Something went wrong, reopen the tunnel\n"
],
"name": "stdout"
}
]
"outputs": []
},
{
"cell_type": "markdown",
......@@ -319,7 +296,7 @@
"\n",
"MODEL_CLASSES = {'roberta': (RobertaConfig, RobertaModel, RobertaTokenizer)}"
],
"execution_count": null,
"execution_count": 12,
"outputs": []
},
{
......@@ -428,7 +405,7 @@
" p.append(text)\n",
" return p"
],
"execution_count": null,
"execution_count": 13,
"outputs": []
},
{
......@@ -460,7 +437,7 @@
" 'device' : torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n",
"})"
],
"execution_count": null,
"execution_count": 14,
"outputs": []
},
{
......