From 856d7de430f7165001b35149a691d3844c212db4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Geron?= Date: Fri, 17 Nov 2023 10:30:44 +1300 Subject: [PATCH] Remove tensorboard.dev code examples since the service will shut down in December 2023 --- 10_neural_nets_with_keras.ipynb | 190 +++++++++----------------------- 1 file changed, 50 insertions(+), 140 deletions(-) diff --git a/10_neural_nets_with_keras.ipynb b/10_neural_nets_with_keras.ipynb index 6a3710a..12860bf 100644 --- a/10_neural_nets_with_keras.ipynb +++ b/10_neural_nets_with_keras.ipynb @@ -2632,97 +2632,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "You can share your TensorBoard logs with the world by uploading them to https://tensorboard.dev/. For this, you can run the `tensorboard dev upload` command, with the `--logdir` and `--one_shot` options, and optionally the `--name` and `--description` options. The first time, it will ask you to accept Google's Terms of Service, and to authenticate.\n", - "\n", - "Notes:\n", - "* Authenticating requires user input. Colab supports user input from shell commands, but the main other Jupyter environments do not, so for them we use a hackish workaround (alternatively, you could run the command in a terminal window, after you make sure to activate this project's conda environment and move to this notebook's directory).\n", - "* If you get an authentication related error (such as *invalid_grant: Bad Request*), it's likely that your login session has expired. In this case, try running the command `tensorboard dev auth revoke` to logout, and try again." - ] - }, - { - "cell_type": "code", - "execution_count": 90, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "New experiment created. View your TensorBoard at: https://tensorboard.dev/experiment/il3YO6KgQHeQuMpX8cxgYw/\n", - "\n", - "\u001b[1m[2022-08-01T17:26:19]\u001b[0m Started scanning logdir.\n", - "\u001b[1m[2022-08-01T17:26:25]\u001b[0m Total uploaded: 1120 scalars, 2000 tensors (1.2 MB), 1 binary objects (29.2 kB)\n", - "\u001b[1m[2022-08-01T17:26:25]\u001b[0m Done scanning logdir.\n", - "\n", - "\n", - "Done. View your TensorBoard at https://tensorboard.dev/experiment/il3YO6KgQHeQuMpX8cxgYw/\n" - ] - } - ], - "source": [ - "# extra code\n", - "\n", - "if \"google.colab\" in sys.modules:\n", - " !tensorboard dev upload --logdir ./my_logs --one_shot \\\n", - " --name \"Quick test\" --description \"This is a test\" \n", - "else:\n", - " from tensorboard.main import run_main\n", - "\n", - " argv = \"tensorboard dev upload --logdir ./my_logs --one_shot\".split()\n", - " argv += [\"--name\", \"Quick test\", \"--description\", \"This is a test\"]\n", - " try:\n", - " original_sys_argv_and_sys_exit = sys.argv, sys.exit\n", - " sys.argv, sys.exit = argv, lambda status: None\n", - " run_main()\n", - " finally:\n", - " sys.argv, sys.exit = original_sys_argv_and_sys_exit" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "You can get list your published experiments:" - ] - }, - { - "cell_type": "code", - "execution_count": 91, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://tensorboard.dev/experiment/il3YO6KgQHeQuMpX8cxgYw/\n", - "\tName Quick test\n", - "\tDescription This is a test\n", - "\tId il3YO6KgQHeQuMpX8cxgYw\n", - "\tCreated 2022-08-01 17:26:19 (20 seconds ago)\n", - "\tUpdated 2022-08-01 17:26:25 (14 seconds ago)\n", - "\tRuns 3\n", - "\tTags 8\n", - "\tScalars 1120\n", - "\tTensor bytes 1421436\n", - "\tBinary object bytes 30096\n", - "Total: 1 experiment(s)\n" - ] - } - ], - "source": [ - "!tensorboard dev list" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "To delete an experiment, use the following command:\n", - "\n", - "```python\n", - "!tensorboard dev delete --experiment_id \n", - "```" + "**Note**: it used to be possible to easily share your TensorBoard logs with the world by uploading them to https://tensorboard.dev/. Sadly, this service will shut down in December 2023, so I have removed the corresponding code examples from this notebook." ] }, { @@ -2734,7 +2644,7 @@ }, { "cell_type": "code", - "execution_count": 92, + "execution_count": 90, "metadata": {}, "outputs": [ { @@ -2783,7 +2693,7 @@ }, { "cell_type": "code", - "execution_count": 93, + "execution_count": 91, "metadata": {}, "outputs": [], "source": [ @@ -2794,7 +2704,7 @@ }, { "cell_type": "code", - "execution_count": 94, + "execution_count": 92, "metadata": {}, "outputs": [], "source": [ @@ -2804,7 +2714,7 @@ }, { "cell_type": "code", - "execution_count": 95, + "execution_count": 93, "metadata": {}, "outputs": [], "source": [ @@ -2814,7 +2724,7 @@ }, { "cell_type": "code", - "execution_count": 96, + "execution_count": 94, "metadata": {}, "outputs": [], "source": [ @@ -2843,7 +2753,7 @@ }, { "cell_type": "code", - "execution_count": 97, + "execution_count": 95, "metadata": {}, "outputs": [ { @@ -2876,7 +2786,7 @@ }, { "cell_type": "code", - "execution_count": 98, + "execution_count": 96, "metadata": {}, "outputs": [], "source": [ @@ -2886,7 +2796,7 @@ }, { "cell_type": "code", - "execution_count": 99, + "execution_count": 97, "metadata": {}, "outputs": [ { @@ -2898,7 +2808,7 @@ " 'optimizer': 'adam'}" ] }, - "execution_count": 99, + "execution_count": 97, "metadata": {}, "output_type": "execute_result" } @@ -2910,7 +2820,7 @@ }, { "cell_type": "code", - "execution_count": 100, + "execution_count": 98, "metadata": {}, "outputs": [ { @@ -2934,7 +2844,7 @@ }, { "cell_type": "code", - "execution_count": 101, + "execution_count": 99, "metadata": {}, "outputs": [ { @@ -2943,7 +2853,7 @@ "0.8736000061035156" ] }, - "execution_count": 101, + "execution_count": 99, "metadata": {}, "output_type": "execute_result" } @@ -2954,7 +2864,7 @@ }, { "cell_type": "code", - "execution_count": 102, + "execution_count": 100, "metadata": {}, "outputs": [ { @@ -2992,7 +2902,7 @@ }, { "cell_type": "code", - "execution_count": 103, + "execution_count": 101, "metadata": {}, "outputs": [], "source": [ @@ -3009,7 +2919,7 @@ }, { "cell_type": "code", - "execution_count": 104, + "execution_count": 102, "metadata": {}, "outputs": [], "source": [ @@ -3021,7 +2931,7 @@ }, { "cell_type": "code", - "execution_count": 105, + "execution_count": 103, "metadata": {}, "outputs": [ { @@ -3055,7 +2965,7 @@ }, { "cell_type": "code", - "execution_count": 106, + "execution_count": 104, "metadata": {}, "outputs": [ { @@ -3090,7 +3000,7 @@ }, { "cell_type": "code", - "execution_count": 107, + "execution_count": 105, "metadata": {}, "outputs": [ { @@ -3188,7 +3098,7 @@ }, { "cell_type": "code", - "execution_count": 108, + "execution_count": 106, "metadata": {}, "outputs": [], "source": [ @@ -3204,7 +3114,7 @@ }, { "cell_type": "code", - "execution_count": 109, + "execution_count": 107, "metadata": {}, "outputs": [ { @@ -3213,7 +3123,7 @@ "(60000, 28, 28)" ] }, - "execution_count": 109, + "execution_count": 107, "metadata": {}, "output_type": "execute_result" } @@ -3231,7 +3141,7 @@ }, { "cell_type": "code", - "execution_count": 110, + "execution_count": 108, "metadata": {}, "outputs": [ { @@ -3240,7 +3150,7 @@ "dtype('uint8')" ] }, - "execution_count": 110, + "execution_count": 108, "metadata": {}, "output_type": "execute_result" } @@ -3258,7 +3168,7 @@ }, { "cell_type": "code", - "execution_count": 111, + "execution_count": 109, "metadata": {}, "outputs": [], "source": [ @@ -3277,7 +3187,7 @@ }, { "cell_type": "code", - "execution_count": 112, + "execution_count": 110, "metadata": {}, "outputs": [ { @@ -3308,7 +3218,7 @@ }, { "cell_type": "code", - "execution_count": 113, + "execution_count": 111, "metadata": {}, "outputs": [ { @@ -3317,7 +3227,7 @@ "array([7, 3, 4, ..., 5, 6, 8], dtype=uint8)" ] }, - "execution_count": 113, + "execution_count": 111, "metadata": {}, "output_type": "execute_result" } @@ -3335,7 +3245,7 @@ }, { "cell_type": "code", - "execution_count": 114, + "execution_count": 112, "metadata": {}, "outputs": [ { @@ -3344,7 +3254,7 @@ "(5000, 28, 28)" ] }, - "execution_count": 114, + "execution_count": 112, "metadata": {}, "output_type": "execute_result" } @@ -3355,7 +3265,7 @@ }, { "cell_type": "code", - "execution_count": 115, + "execution_count": 113, "metadata": {}, "outputs": [ { @@ -3364,7 +3274,7 @@ "(10000, 28, 28)" ] }, - "execution_count": 115, + "execution_count": 113, "metadata": {}, "output_type": "execute_result" } @@ -3382,7 +3292,7 @@ }, { "cell_type": "code", - "execution_count": 116, + "execution_count": 114, "metadata": {}, "outputs": [ { @@ -3422,7 +3332,7 @@ }, { "cell_type": "code", - "execution_count": 117, + "execution_count": 115, "metadata": {}, "outputs": [], "source": [ @@ -3441,7 +3351,7 @@ }, { "cell_type": "code", - "execution_count": 118, + "execution_count": 116, "metadata": {}, "outputs": [], "source": [ @@ -3452,7 +3362,7 @@ }, { "cell_type": "code", - "execution_count": 119, + "execution_count": 117, "metadata": {}, "outputs": [], "source": [ @@ -3473,7 +3383,7 @@ }, { "cell_type": "code", - "execution_count": 120, + "execution_count": 118, "metadata": {}, "outputs": [], "source": [ @@ -3492,7 +3402,7 @@ }, { "cell_type": "code", - "execution_count": 121, + "execution_count": 119, "metadata": {}, "outputs": [ { @@ -3518,7 +3428,7 @@ }, { "cell_type": "code", - "execution_count": 122, + "execution_count": 120, "metadata": {}, "outputs": [ { @@ -3527,7 +3437,7 @@ "Text(0, 0.5, 'Loss')" ] }, - "execution_count": 122, + "execution_count": 120, "metadata": {}, "output_type": "execute_result" }, @@ -3563,7 +3473,7 @@ }, { "cell_type": "code", - "execution_count": 123, + "execution_count": 121, "metadata": {}, "outputs": [], "source": [ @@ -3574,7 +3484,7 @@ }, { "cell_type": "code", - "execution_count": 124, + "execution_count": 122, "metadata": {}, "outputs": [], "source": [ @@ -3588,7 +3498,7 @@ }, { "cell_type": "code", - "execution_count": 125, + "execution_count": 123, "metadata": {}, "outputs": [], "source": [ @@ -3599,7 +3509,7 @@ }, { "cell_type": "code", - "execution_count": 126, + "execution_count": 124, "metadata": {}, "outputs": [ { @@ -3608,7 +3518,7 @@ "PosixPath('my_mnist_logs/run_001')" ] }, - "execution_count": 126, + "execution_count": 124, "metadata": {}, "output_type": "execute_result" } @@ -3621,7 +3531,7 @@ }, { "cell_type": "code", - "execution_count": 127, + "execution_count": 125, "metadata": {}, "outputs": [ { @@ -3693,7 +3603,7 @@ }, { "cell_type": "code", - "execution_count": 128, + "execution_count": 126, "metadata": {}, "outputs": [ { @@ -3709,7 +3619,7 @@ "[0.07079131156206131, 0.9799000024795532]" ] }, - "execution_count": 128, + "execution_count": 126, "metadata": {}, "output_type": "execute_result" } @@ -3728,7 +3638,7 @@ }, { "cell_type": "code", - "execution_count": 129, + "execution_count": 127, "metadata": {}, "outputs": [ { @@ -3786,7 +3696,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.6" + "version": "3.9.10" }, "nav_menu": { "height": "264px",