graykode

(refactor) remove output in google colab

...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 "nbformat_minor": 0, 3 "nbformat_minor": 0,
4 "metadata": { 4 "metadata": {
5 "colab": { 5 "colab": {
6 - "name": "commit-autosuggestions.ipynb", 6 + "name": "commit_autosuggestions.ipynb",
7 "provenance": [], 7 "provenance": [],
8 "collapsed_sections": [], 8 "collapsed_sections": [],
9 "toc_visible": true 9 "toc_visible": true
...@@ -124,9 +124,9 @@ ...@@ -124,9 +124,9 @@
124 }, 124 },
125 "source": [ 125 "source": [
126 "# Paste your authtoken here in quotes\n", 126 "# Paste your authtoken here in quotes\n",
127 - "authtoken = \"21KfrFEW1BptdPPM4SS_7s1Z4HwozyXX9NP2fHC12\"" 127 + "authtoken = \"1kskZgJ8KpCRvYnzSF63AcodvBr_4RMXxFo4Sa2qLrRaKjhJW\""
128 ], 128 ],
129 - "execution_count": null, 129 + "execution_count": 5,
130 "outputs": [] 130 "outputs": []
131 }, 131 },
132 { 132 {
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
161 "local_in_port = 5000\n", 161 "local_in_port = 5000\n",
162 "local_out_port = 5000" 162 "local_out_port = 5000"
163 ], 163 ],
164 - "execution_count": null, 164 + "execution_count": 6,
165 "outputs": [] 165 "outputs": []
166 }, 166 },
167 { 167 {
...@@ -187,26 +187,14 @@ ...@@ -187,26 +187,14 @@
187 "with open('ngrok.conf', 'w') as f:\n", 187 "with open('ngrok.conf', 'w') as f:\n",
188 " f.write(config)" 188 " f.write(config)"
189 ], 189 ],
190 - "execution_count": 1, 190 + "execution_count": 7,
191 - "outputs": [ 191 + "outputs": []
192 - {
193 - "output_type": "error",
194 - "ename": "NameError",
195 - "evalue": "name 'authtoken' is not defined",
196 - "traceback": [
197 - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
198 - "\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
199 - "\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",
200 - "\u001b[1;31mNameError\u001b[0m: name 'authtoken' is not defined"
201 - ]
202 - }
203 - ]
204 }, 192 },
205 { 193 {
206 "cell_type": "code", 194 "cell_type": "code",
207 - "execution_count": null, 195 + "metadata": {
208 - "metadata": {}, 196 + "id": "5r252w0r0Z0o"
209 - "outputs": [], 197 + },
210 "source": [ 198 "source": [
211 "from subprocess import Popen, PIPE\n", 199 "from subprocess import Popen, PIPE\n",
212 "import shlex\n", 200 "import shlex\n",
...@@ -240,7 +228,9 @@ ...@@ -240,7 +228,9 @@
240 " print(f'unknown tunnel: {tunnel[\"name\"]}')\n", 228 " print(f'unknown tunnel: {tunnel[\"name\"]}')\n",
241 "\n", 229 "\n",
242 " return in_addr, out_addr" 230 " return in_addr, out_addr"
243 - ] 231 + ],
232 + "execution_count": 9,
233 + "outputs": []
244 }, 234 },
245 { 235 {
246 "cell_type": "code", 236 "cell_type": "code",
...@@ -255,17 +245,13 @@ ...@@ -255,17 +245,13 @@
255 "ps = Popen('./scripts/open_tunnel_ngrok.sh', stdout=PIPE, stderr=PIPE)\n", 245 "ps = Popen('./scripts/open_tunnel_ngrok.sh', stdout=PIPE, stderr=PIPE)\n",
256 "time.sleep(3)" 246 "time.sleep(3)"
257 ], 247 ],
258 - "execution_count": null, 248 + "execution_count": 10,
259 "outputs": [] 249 "outputs": []
260 }, 250 },
261 { 251 {
262 "cell_type": "code", 252 "cell_type": "code",
263 "metadata": { 253 "metadata": {
264 - "id": "pJgdFr0Fdjoq", 254 + "id": "pJgdFr0Fdjoq"
265 - "outputId": "3948f70b-d4f3-4ed8-a864-fe5c6df50809",
266 - "colab": {
267 - "base_uri": "https://localhost:8080/"
268 - }
269 }, 255 },
270 "source": [ 256 "source": [
271 "# Get tunnel addresses\n", 257 "# Get tunnel addresses\n",
...@@ -277,16 +263,7 @@ ...@@ -277,16 +263,7 @@
277 " print(\"Something went wrong, reopen the tunnel\")" 263 " print(\"Something went wrong, reopen the tunnel\")"
278 ], 264 ],
279 "execution_count": null, 265 "execution_count": null,
280 - "outputs": [ 266 + "outputs": []
281 - {
282 - "output_type": "stream",
283 - "text": [
284 - "Opening tunnel\n",
285 - "Something went wrong, reopen the tunnel\n"
286 - ],
287 - "name": "stdout"
288 - }
289 - ]
290 }, 267 },
291 { 268 {
292 "cell_type": "markdown", 269 "cell_type": "markdown",
...@@ -319,7 +296,7 @@ ...@@ -319,7 +296,7 @@
319 "\n", 296 "\n",
320 "MODEL_CLASSES = {'roberta': (RobertaConfig, RobertaModel, RobertaTokenizer)}" 297 "MODEL_CLASSES = {'roberta': (RobertaConfig, RobertaModel, RobertaTokenizer)}"
321 ], 298 ],
322 - "execution_count": null, 299 + "execution_count": 12,
323 "outputs": [] 300 "outputs": []
324 }, 301 },
325 { 302 {
...@@ -428,7 +405,7 @@ ...@@ -428,7 +405,7 @@
428 " p.append(text)\n", 405 " p.append(text)\n",
429 " return p" 406 " return p"
430 ], 407 ],
431 - "execution_count": null, 408 + "execution_count": 13,
432 "outputs": [] 409 "outputs": []
433 }, 410 },
434 { 411 {
...@@ -460,7 +437,7 @@ ...@@ -460,7 +437,7 @@
460 " 'device' : torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n", 437 " 'device' : torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n",
461 "})" 438 "})"
462 ], 439 ],
463 - "execution_count": null, 440 + "execution_count": 14,
464 "outputs": [] 441 "outputs": []
465 }, 442 },
466 { 443 {
......