From 861c296312c1e913d8889aa01c2954c2430fb67a Mon Sep 17 00:00:00 2001 From: rasbt Date: Sat, 16 Mar 2024 09:50:00 -0500 Subject: [PATCH] add imports and version on top --- ch04/01_main-chapter-code/ch04.ipynb | 30 +++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/ch04/01_main-chapter-code/ch04.ipynb b/ch04/01_main-chapter-code/ch04.ipynb index 4f75a93..ef4a388 100644 --- a/ch04/01_main-chapter-code/ch04.ipynb +++ b/ch04/01_main-chapter-code/ch04.ipynb @@ -8,6 +8,34 @@ "# Chapter 4: Implementing a GPT model from Scratch To Generate Text " ] }, + { + "cell_type": "code", + "execution_count": 1, + "id": "f9eac223-a125-40f7-bacc-bd0d890450c7", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "matplotlib version: 3.7.2\n", + "torch version: 2.2.1\n", + "tiktoken version: 0.5.1\n" + ] + } + ], + "source": [ + "from importlib.metadata import version\n", + "\n", + "import matplotlib\n", + "import tiktoken\n", + "import torch\n", + "\n", + "print(\"matplotlib version:\", version(\"matplotlib\"))\n", + "print(\"torch version:\", version(\"torch\"))\n", + "print(\"tiktoken version:\", version(\"tiktoken\"))" + ] + }, { "cell_type": "markdown", "id": "e7da97ed-e02f-4d7f-b68e-a0eba3716e02", @@ -1478,7 +1506,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.12" + "version": "3.11.4" } }, "nbformat": 4,