From c6f7fa249b612ce7a51f0e1bff053bda3cefee62 Mon Sep 17 00:00:00 2001 From: Dalby123 Date: Wed, 7 May 2025 11:54:32 +0900 Subject: [PATCH 1/5] =?UTF-8?q?Colab=20=E3=82=92=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E3=81=97=E3=81=A6=E4=BD=9C=E6=88=90=E3=81=95=E3=82=8C=E3=81=BE?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- day1/day1_practice.ipynb | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/day1/day1_practice.ipynb b/day1/day1_practice.ipynb index a1dec3a9e..c93613c5b 100644 --- a/day1/day1_practice.ipynb +++ b/day1/day1_practice.ipynb @@ -59,11 +59,27 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "id": "AIXMavdDEP8U" - }, - "outputs": [], + "execution_count": 1, + "metadata": { + "id": "AIXMavdDEP8U", + "outputId": "9175b913-20cb-4fd7-b77b-12b5c6cc428c", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Cloning into 'lecture-ai-engineering'...\n", + "remote: Enumerating objects: 52, done.\u001b[K\n", + "remote: Total 52 (delta 0), reused 0 (delta 0), pack-reused 52 (from 1)\u001b[K\n", + "Receiving objects: 100% (52/52), 83.21 KiB | 6.93 MiB/s, done.\n", + "Resolving deltas: 100% (9/9), done.\n" + ] + } + ], "source": [ "!git clone https://github.com/matsuolab/lecture-ai-engineering.git" ] @@ -391,7 +407,9 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "id": "Tpz7qAmOqcAD" + }, "source": [ "アプリケーションの機能としては、チャット機能や履歴閲覧があります。\n", "\n", @@ -567,4 +585,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} +} \ No newline at end of file From 06757007eca69cf6d0afc8ea0c80113915441c79 Mon Sep 17 00:00:00 2001 From: Dalby123 Date: Wed, 7 May 2025 11:56:27 +0900 Subject: [PATCH 2/5] =?UTF-8?q?Colab=20=E3=82=92=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E3=81=97=E3=81=A6=E4=BD=9C=E6=88=90=E3=81=95=E3=82=8C=E3=81=BE?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- day1/day1_practice.ipynb | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/day1/day1_practice.ipynb b/day1/day1_practice.ipynb index c93613c5b..af14110f8 100644 --- a/day1/day1_practice.ipynb +++ b/day1/day1_practice.ipynb @@ -1,5 +1,15 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "view-in-github", + "colab_type": "text" + }, + "source": [ + "\"Open" + ] + }, { "cell_type": "markdown", "metadata": { @@ -62,10 +72,10 @@ "execution_count": 1, "metadata": { "id": "AIXMavdDEP8U", - "outputId": "9175b913-20cb-4fd7-b77b-12b5c6cc428c", "colab": { "base_uri": "https://localhost:8080/" - } + }, + "outputId": "9175b913-20cb-4fd7-b77b-12b5c6cc428c" }, "outputs": [ { @@ -573,7 +583,8 @@ ], "metadata": { "colab": { - "provenance": [] + "provenance": [], + "include_colab_link": true }, "kernelspec": { "display_name": "Python 3", From 3b234b60550251f84b527a876c46ac889d0681de Mon Sep 17 00:00:00 2001 From: Dalby123 Date: Wed, 7 May 2025 12:07:52 +0900 Subject: [PATCH 3/5] =?UTF-8?q?Colab=20=E3=82=92=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E3=81=97=E3=81=A6=E4=BD=9C=E6=88=90=E3=81=95=E3=82=8C=E3=81=BE?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- day1/day1_practice.ipynb | 367 +++++++++++++++++++++++++++++++++++---- 1 file changed, 331 insertions(+), 36 deletions(-) diff --git a/day1/day1_practice.ipynb b/day1/day1_practice.ipynb index af14110f8..b08a16a8d 100644 --- a/day1/day1_practice.ipynb +++ b/day1/day1_practice.ipynb @@ -1,15 +1,5 @@ { "cells": [ - { - "cell_type": "markdown", - "metadata": { - "id": "view-in-github", - "colab_type": "text" - }, - "source": [ - "\"Open" - ] - }, { "cell_type": "markdown", "metadata": { @@ -141,11 +131,34 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": { - "id": "bvEowFfg5lrq" + "id": "bvEowFfg5lrq", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "20eda009-7258-47a1-fb66-008530516679" }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Requirement already satisfied: python-dotenv in /usr/local/lib/python3.11/dist-packages (1.1.0)\n", + "/content/lecture-ai-engineering/day1\n" + ] + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "True" + ] + }, + "metadata": {}, + "execution_count": 3 + } + ], "source": [ "!pip install python-dotenv\n", "from dotenv import load_dotenv, find_dotenv\n", @@ -167,11 +180,23 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": { - "id": "S28XgOm0ELSM" + "id": "S28XgOm0ELSM", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "25f94a40-3867-4409-db4b-cdc7d72ab03e" }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "/content/lecture-ai-engineering/day1/01_streamlit_UI\n" + ] + } + ], "source": [ "%cd /content/lecture-ai-engineering/day1/01_streamlit_UI" ] @@ -187,7 +212,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "metadata": { "id": "nBe41LFiELSN" }, @@ -208,11 +233,23 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "metadata": { - "id": "aYw1q0iXELSN" + "id": "aYw1q0iXELSN", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "6fce0e86-a0d2-4a3a-ef02-a68745a21769" }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Authtoken saved to configuration file: /root/.config/ngrok/ngrok.yml\n" + ] + } + ], "source": [ "!ngrok authtoken $$NGROK_TOKEN" ] @@ -228,11 +265,35 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "metadata": { - "id": "f-E7ucR6ELSN" + "id": "f-E7ucR6ELSN", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "0a4e7054-0978-40df-8996-7a3632ed9a0f" }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "公開URL: https://8344-34-86-114-155.ngrok-free.app\n", + "\n", + "Collecting usage statistics. To deactivate, set browser.gatherUsageStats to false.\n", + "\u001b[0m\n", + "\u001b[0m\n", + "\u001b[34m\u001b[1m You can now view your Streamlit app in your browser.\u001b[0m\n", + "\u001b[0m\n", + "\u001b[34m Local URL: \u001b[0m\u001b[1mhttp://localhost:8501\u001b[0m\n", + "\u001b[34m Network URL: \u001b[0m\u001b[1mhttp://172.28.0.12:8501\u001b[0m\n", + "\u001b[34m External URL: \u001b[0m\u001b[1mhttp://34.86.114.155:8501\u001b[0m\n", + "\u001b[0m\n", + "\u001b[34m Stopping...\u001b[0m\n", + "^C\n" + ] + } + ], "source": [ "from pyngrok import ngrok\n", "\n", @@ -269,7 +330,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 10, "metadata": { "id": "8Ek9QgahELSO" }, @@ -300,11 +361,23 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 12, "metadata": { - "id": "UeEjlJ7uELSO" + "id": "UeEjlJ7uELSO", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "41b6fe82-3e2f-49e3-8609-63cd66d2f77a" }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "/content/lecture-ai-engineering/day1/02_streamlit_app\n" + ] + } + ], "source": [ "%cd /content/lecture-ai-engineering/day1/02_streamlit_app" ] @@ -320,7 +393,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "metadata": { "id": "mDqvI4V3ELSO" }, @@ -341,11 +414,29 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "metadata": { - "id": "jPxTiEWQELSO" + "id": "jPxTiEWQELSO", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "13c951a8-2f1a-48f2-a7e4-a8c267c44e0b" }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Authtoken saved to configuration file: /root/.config/ngrok/ngrok.yml\n", + "The token has not been saved to the git credentials helper. Pass `add_to_git_credential=True` in this function directly or `--add-to-git-credential` if using via `huggingface-cli` if you want to set the git credential as well.\n", + "Token is valid (permission: write).\n", + "The token `AI engineering` has been saved to /root/.cache/huggingface/stored_tokens\n", + "Your token has been saved to /root/.cache/huggingface/token\n", + "Login successful.\n", + "The current active token is: `AI engineering`\n" + ] + } + ], "source": [ "!ngrok authtoken $$NGROK_TOKEN\n", "!huggingface-cli login --token $$HUGGINGFACE_TOKEN" @@ -362,7 +453,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, "metadata": { "id": "W184-a7qFP0W" }, @@ -404,9 +495,214 @@ "cell_type": "code", "execution_count": null, "metadata": { - "id": "TBQyTTWTELSP" + "id": "TBQyTTWTELSP", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "c158a79c-378e-470f-e105-30a5e4b301c1" }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "公開URL: https://abc0-34-86-114-155.ngrok-free.app\n", + "\n", + "Collecting usage statistics. To deactivate, set browser.gatherUsageStats to false.\n", + "\u001b[0m\n", + "\u001b[0m\n", + "\u001b[34m\u001b[1m You can now view your Streamlit app in your browser.\u001b[0m\n", + "\u001b[0m\n", + "\u001b[34m Local URL: \u001b[0m\u001b[1mhttp://localhost:8501\u001b[0m\n", + "\u001b[34m Network URL: \u001b[0m\u001b[1mhttp://172.28.0.12:8501\u001b[0m\n", + "\u001b[34m External URL: \u001b[0m\u001b[1mhttp://34.86.114.155:8501\u001b[0m\n", + "\u001b[0m\n", + "NLTK loaded successfully.\n", + "2025-05-07 03:07:12.843596: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n", + "WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n", + "E0000 00:00:1746587233.106870 4271 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n", + "E0000 00:00:1746587233.176888 4271 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n", + "2025-05-07 03:07:13.698439: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n", + "To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "config.json: 100% 805/805 [00:00<00:00, 4.05MB/s]\n", + "model.safetensors.index.json: 100% 24.2k/24.2k [00:00<00:00, 68.0MB/s]\n", + "Fetching 2 files: 0% 0/2 [00:00 Date: Wed, 7 May 2025 15:16:31 +0900 Subject: [PATCH 4/5] =?UTF-8?q?Colab=20=E3=82=92=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E3=81=97=E3=81=A6=E4=BD=9C=E6=88=90=E3=81=95=E3=82=8C=E3=81=BE?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- day1/day1_practice.ipynb | 655 +++++++++++++++++++++++++++++---------- 1 file changed, 487 insertions(+), 168 deletions(-) diff --git a/day1/day1_practice.ipynb b/day1/day1_practice.ipynb index b08a16a8d..5e3b1e7e3 100644 --- a/day1/day1_practice.ipynb +++ b/day1/day1_practice.ipynb @@ -499,14 +499,17 @@ "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "c158a79c-378e-470f-e105-30a5e4b301c1" + "outputId": "4046d29b-e6d9-459f-a670-2bb9d46936af" }, "outputs": [ { - "output_type": "stream", + "metadata": { + "tags": null + }, "name": "stdout", + "output_type": "stream", "text": [ - "公開URL: https://abc0-34-86-114-155.ngrok-free.app\n", + "公開URL: https://b306-34-86-114-155.ngrok-free.app\n", "\n", "Collecting usage statistics. To deactivate, set browser.gatherUsageStats to false.\n", "\u001b[0m\n", @@ -518,188 +521,504 @@ "\u001b[34m External URL: \u001b[0m\u001b[1mhttp://34.86.114.155:8501\u001b[0m\n", "\u001b[0m\n", "NLTK loaded successfully.\n", - "2025-05-07 03:07:12.843596: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n", + "2025-05-07 03:23:39.872600: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n", "WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n", - "E0000 00:00:1746587233.106870 4271 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n", - "E0000 00:00:1746587233.176888 4271 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n", - "2025-05-07 03:07:13.698439: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n", + "E0000 00:00:1746588219.927042 8349 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n", + "E0000 00:00:1746588219.942220 8349 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n", + "2025-05-07 03:23:39.997841: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n", "To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n", "NLTK Punkt data checked/downloaded.\n", "Database 'chat_feedback.db' initialized successfully.\n", - "Data saved to DB successfully.\n", - "Data saved to DB successfully.\n", - "Data saved to DB successfully.\n", - "Data saved to DB successfully.\n", - "Data saved to DB successfully.\n", - "Data saved to DB successfully.\n", - "Data saved to DB successfully.\n", - "Data saved to DB successfully.\n", - "Data saved to DB successfully.\n", - "Data saved to DB successfully.\n", - "config.json: 100% 805/805 [00:00<00:00, 4.05MB/s]\n", - "model.safetensors.index.json: 100% 24.2k/24.2k [00:00<00:00, 68.0MB/s]\n", - "Fetching 2 files: 0% 0/2 [00:00\n", + " lambda m: list(m.__path__._path),\n", + " ^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", + " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK loaded successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "2025-05-07 03:27:36.457 Examining the path of torch.classes raised:\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", + " if asyncio.get_running_loop().is_running():\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: no running event loop\n", "\n", - "model-00002-of-00002.safetensors: 9% 21.0M/241M [00:00<00:04, 45.5MB/s]\u001b[A\u001b[A\n", - "model-00001-of-00002.safetensors: 4% 189M/4.99G [00:00<00:26, 179MB/s]\u001b[A\n", + "During handling of the above exception, another exception occurred:\n", "\n", - "model-00002-of-00002.safetensors: 17% 41.9M/241M [00:00<00:02, 74.3MB/s]\u001b[A\u001b[A\n", - "model-00001-of-00002.safetensors: 4% 210M/4.99G [00:01<00:27, 173MB/s]\u001b[A\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", + " potential_paths = extract_paths(module)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", + " lambda m: list(m.__path__._path),\n", + " ^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", + " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK loaded successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "2025-05-07 03:30:14.999 Examining the path of torch.classes raised:\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", + " if asyncio.get_running_loop().is_running():\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: no running event loop\n", "\n", - "model-00002-of-00002.safetensors: 26% 62.9M/241M [00:00<00:01, 91.3MB/s]\u001b[A\u001b[A\n", - "model-00001-of-00002.safetensors: 5% 231M/4.99G [00:01<00:28, 165MB/s]\u001b[A\n", + "During handling of the above exception, another exception occurred:\n", "\n", - "model-00002-of-00002.safetensors: 35% 83.9M/241M [00:00<00:01, 107MB/s] \u001b[A\u001b[A\n", - "model-00001-of-00002.safetensors: 5% 252M/4.99G [00:01<00:30, 155MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 5% 273M/4.99G [00:01<00:30, 154MB/s]\u001b[A\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", + " potential_paths = extract_paths(module)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", + " lambda m: list(m.__path__._path),\n", + " ^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", + " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", + "NLTK loaded successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "\u001b[31m──\u001b[0m\u001b[31m────────────────────────\u001b[0m\u001b[31m \u001b[0m\u001b[1;31mTraceback \u001b[0m\u001b[1;2;31m(most recent call last)\u001b[0m\u001b[31m \u001b[0m\u001b[31m─────────────────────────\u001b[0m\u001b[31m──\u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2;33m/usr/local/lib/python3.11/dist-packages/streamlit/runtime/scriptrunner/\u001b[0m\u001b[1;33mexec_code.py\u001b[0m: \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[94m121\u001b[0m in \u001b[92mexec_func_with_error_handling\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2;33m/usr/local/lib/python3.11/dist-packages/streamlit/runtime/scriptrunner/\u001b[0m\u001b[1;33mscript_runner\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[1;33m.py\u001b[0m:\u001b[94m648\u001b[0m in \u001b[92mcode_to_exec\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2;33m/content/lecture-ai-engineering/day1/02_streamlit_app/\u001b[0m\u001b[1;33mapp.py\u001b[0m:\u001b[94m71\u001b[0m in \u001b[92m\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m68 \u001b[0m\u001b[2m# --- メインコンテンツ ---\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m69 \u001b[0m\u001b[94mif\u001b[0m st.session_state.page == \u001b[33m\"\u001b[0m\u001b[33mチャット\u001b[0m\u001b[33m\"\u001b[0m: \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m70 \u001b[0m\u001b[2m│ \u001b[0m\u001b[94mif\u001b[0m pipe: \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m❱ \u001b[0m71 \u001b[2m│ │ \u001b[0m\u001b[1;4mui.display_chat_page(pipe)\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m72 \u001b[0m\u001b[2m│ \u001b[0m\u001b[94melse\u001b[0m: \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m73 \u001b[0m\u001b[2m│ │ \u001b[0mst.error(\u001b[33m\"\u001b[0m\u001b[33mチャット機能を利用できません。モデルの読み込みに失敗しました \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m74 \u001b[0m\u001b[94melif\u001b[0m st.session_state.page == \u001b[33m\"\u001b[0m\u001b[33m履歴閲覧\u001b[0m\u001b[33m\"\u001b[0m: \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2;33m/content/lecture-ai-engineering/day1/02_streamlit_app/\u001b[0m\u001b[1;33mui.py\u001b[0m:\u001b[94m17\u001b[0m in \u001b[92mdisplay_chat_page\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 14 \u001b[0m\u001b[2m│ \u001b[0muser_question = st.text_area(\u001b[33m\"\u001b[0m\u001b[33m質問\u001b[0m\u001b[33m\"\u001b[0m, key=\u001b[33m\"\u001b[0m\u001b[33mquestion_input\u001b[0m\u001b[33m\"\u001b[0m, height=\u001b[94m100\u001b[0m, val \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 15 \u001b[0m\u001b[2m│ \u001b[0msubmit_button = st.button(\u001b[33m\"\u001b[0m\u001b[33m質問を送信\u001b[0m\u001b[33m\"\u001b[0m) \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 16 \u001b[0m\u001b[2m│ \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m❱ \u001b[0m 17 \u001b[2m│ \u001b[0m\u001b[2m# セッション状態の初期化(安全のため)\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 18 \u001b[0m\u001b[2m│ \u001b[0m\u001b[94mif\u001b[0m \u001b[33m\"\u001b[0m\u001b[33mcurrent_question\u001b[0m\u001b[33m\"\u001b[0m \u001b[95mnot\u001b[0m \u001b[95min\u001b[0m st.session_state: \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 19 \u001b[0m\u001b[2m│ │ \u001b[0mst.session_state.current_question = \u001b[33m\"\u001b[0m\u001b[33m\"\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 20 \u001b[0m\u001b[2m│ \u001b[0m\u001b[94mif\u001b[0m \u001b[33m\"\u001b[0m\u001b[33mcurrent_answer\u001b[0m\u001b[33m\"\u001b[0m \u001b[95mnot\u001b[0m \u001b[95min\u001b[0m st.session_state: \u001b[31m \u001b[0m\n", + "\u001b[31m────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n", + "\u001b[1;91mNameError: \u001b[0mname \u001b[32m'TEMPLATES'\u001b[0m is not defined\n", + "2025-05-07 03:32:36.898 Examining the path of torch.classes raised:\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", + " if asyncio.get_running_loop().is_running():\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: no running event loop\n", "\n", - "model-00002-of-00002.safetensors: 44% 105M/241M [00:01<00:01, 108MB/s] \u001b[A\u001b[A\n", + "During handling of the above exception, another exception occurred:\n", "\n", - "model-00002-of-00002.safetensors: 52% 126M/241M [00:01<00:00, 118MB/s]\u001b[A\u001b[A\n", - "model-00001-of-00002.safetensors: 6% 294M/4.99G [00:01<00:33, 140MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 6% 315M/4.99G [00:01<00:33, 140MB/s]\u001b[A\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", + " potential_paths = extract_paths(module)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", + " lambda m: list(m.__path__._path),\n", + " ^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", + " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", + "NLTK loaded successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "2025-05-07 03:33:13.691 Examining the path of torch.classes raised:\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", + " if asyncio.get_running_loop().is_running():\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: no running event loop\n", "\n", - "model-00002-of-00002.safetensors: 61% 147M/241M [00:01<00:00, 115MB/s]\u001b[A\u001b[A\n", - "model-00001-of-00002.safetensors: 7% 336M/4.99G [00:01<00:30, 152MB/s]\u001b[A\n", + "During handling of the above exception, another exception occurred:\n", "\n", - "model-00002-of-00002.safetensors: 70% 168M/241M [00:01<00:00, 116MB/s]\u001b[A\u001b[A\n", - "model-00001-of-00002.safetensors: 7% 357M/4.99G [00:02<00:29, 157MB/s]\u001b[A\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", + " potential_paths = extract_paths(module)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", + " lambda m: list(m.__path__._path),\n", + " ^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", + " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK loaded successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "2025-05-07 03:34:44.679 Examining the path of torch.classes raised:\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", + " if asyncio.get_running_loop().is_running():\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: no running event loop\n", "\n", - "model-00002-of-00002.safetensors: 78% 189M/241M [00:01<00:00, 130MB/s]\u001b[A\u001b[A\n", - "model-00001-of-00002.safetensors: 8% 377M/4.99G [00:02<00:30, 149MB/s]\u001b[A\n", + "During handling of the above exception, another exception occurred:\n", "\n", - "model-00002-of-00002.safetensors: 87% 210M/241M [00:01<00:00, 136MB/s]\u001b[A\u001b[A\n", - "model-00001-of-00002.safetensors: 8% 398M/4.99G [00:02<00:31, 147MB/s]\u001b[A\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", + " potential_paths = extract_paths(module)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", + " lambda m: list(m.__path__._path),\n", + " ^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", + " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK loaded successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "2025-05-07 03:37:08.265 Examining the path of torch.classes raised:\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", + " if asyncio.get_running_loop().is_running():\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: no running event loop\n", + "\n", + "During handling of the above exception, another exception occurred:\n", + "\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", + " potential_paths = extract_paths(module)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", + " lambda m: list(m.__path__._path),\n", + " ^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", + " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK loaded successfully.\n", + "\u001b[31m──\u001b[0m\u001b[31m────────────────────────\u001b[0m\u001b[31m \u001b[0m\u001b[1;31mTraceback \u001b[0m\u001b[1;2;31m(most recent call last)\u001b[0m\u001b[31m \u001b[0m\u001b[31m─────────────────────────\u001b[0m\u001b[31m──\u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2;33m/usr/local/lib/python3.11/dist-packages/streamlit/runtime/scriptrunner/\u001b[0m\u001b[1;33mexec_code.py\u001b[0m: \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[94m121\u001b[0m in \u001b[92mexec_func_with_error_handling\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2;33m/usr/local/lib/python3.11/dist-packages/streamlit/runtime/scriptrunner/\u001b[0m\u001b[1;33mscript_runner\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[1;33m.py\u001b[0m:\u001b[94m648\u001b[0m in \u001b[92mcode_to_exec\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2;33m/content/lecture-ai-engineering/day1/02_streamlit_app/\u001b[0m\u001b[1;33mapp.py\u001b[0m:\u001b[94m3\u001b[0m in \u001b[92m\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 1 \u001b[0m\u001b[2m# app.py\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 2 \u001b[0m\u001b[94mimport\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mstreamlit\u001b[0m\u001b[90m \u001b[0m\u001b[94mas\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mst\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m❱ \u001b[0m 3 \u001b[1;4;94mimport\u001b[0m\u001b[1;4;90m \u001b[0m\u001b[1;4;96mui\u001b[0m \u001b[2m# UIモジュール\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 4 \u001b[0m\u001b[94mimport\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mllm\u001b[0m \u001b[2m# LLMモジュール\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 5 \u001b[0m\u001b[94mimport\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mdatabase\u001b[0m \u001b[2m# データベースモジュール\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 6 \u001b[0m\u001b[94mimport\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mmetrics\u001b[0m \u001b[2m# 評価指標モジュール\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2;33m/content/lecture-ai-engineering/day1/02_streamlit_app/\u001b[0m\u001b[1;33mui.py\u001b[0m:\u001b[94m6\u001b[0m in \u001b[92m\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 3 \u001b[0m\u001b[94mimport\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mpandas\u001b[0m\u001b[90m \u001b[0m\u001b[94mas\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mpd\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 4 \u001b[0m\u001b[94mimport\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mtime\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 5 \u001b[0m\u001b[94mfrom\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mdatabase\u001b[0m\u001b[90m \u001b[0m\u001b[94mimport\u001b[0m save_to_db, get_chat_history, get_db_count, clear_db \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m❱ \u001b[0m 6 \u001b[1;4;94mfrom\u001b[0m\u001b[1;4;90m \u001b[0m\u001b[1;4;96mllm\u001b[0m\u001b[1;4;90m \u001b[0m\u001b[1;4;94mimport\u001b[0m\u001b[1;4m generate_response\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 7 \u001b[0m\u001b[94mfrom\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mdata\u001b[0m\u001b[90m \u001b[0m\u001b[94mimport\u001b[0m create_sample_evaluation_data \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 8 \u001b[0m\u001b[94mfrom\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mmetrics\u001b[0m\u001b[90m \u001b[0m\u001b[94mimport\u001b[0m get_metrics_descriptions \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 9 \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n", + "\u001b[91m────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n", + "\u001b[91m \u001b[0m \u001b[2;33m /content/lecture-ai-engineering/day1/02_streamlit_app/\u001b[0m\u001b[1;33mllm.py\u001b[0m\u001b[1m:\u001b[0m\u001b[1;94m25\u001b[0m \u001b[91m \u001b[0m\n", + "\u001b[91m \u001b[0m \u001b[33mdevice\u001b[0m=\u001b[35mdevice\u001b[0m \u001b[91m \u001b[0m\n", + "\u001b[91m \u001b[0m \u001b[1;91m▲\u001b[0m \u001b[91m \u001b[0m\n", + "\u001b[91m────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n", + "\u001b[1;91mSyntaxError: \u001b[0minvalid syntax. Perhaps you forgot a comma?\n", + "2025-05-07 03:38:24.603 Examining the path of torch.classes raised:\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", + " if asyncio.get_running_loop().is_running():\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: no running event loop\n", + "\n", + "During handling of the above exception, another exception occurred:\n", + "\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", + " potential_paths = extract_paths(module)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", + " lambda m: list(m.__path__._path),\n", + " ^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", + " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "Device set to use cpu\n", + "2025-05-07 03:38:43.992 Examining the path of torch.classes raised:\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", + " if asyncio.get_running_loop().is_running():\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: no running event loop\n", "\n", - "model-00002-of-00002.safetensors: 96% 231M/241M [00:02<00:00, 135MB/s]\u001b[A\u001b[A\n", - "model-00002-of-00002.safetensors: 100% 241M/241M [00:02<00:00, 110MB/s]\n", + "During handling of the above exception, another exception occurred:\n", "\n", - "model-00001-of-00002.safetensors: 9% 440M/4.99G [00:02<00:28, 157MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 9% 472M/4.99G [00:02<00:24, 184MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 10% 503M/4.99G [00:02<00:22, 199MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 11% 535M/4.99G [00:03<00:21, 211MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 11% 566M/4.99G [00:03<00:20, 219MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 12% 598M/4.99G [00:03<00:19, 225MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 13% 629M/4.99G [00:03<00:19, 226MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 13% 661M/4.99G [00:03<00:20, 216MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 14% 692M/4.99G [00:03<00:19, 222MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 15% 724M/4.99G [00:03<00:19, 223MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 15% 755M/4.99G [00:04<00:18, 224MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 16% 786M/4.99G [00:04<00:18, 232MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 16% 818M/4.99G [00:04<00:20, 208MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 17% 849M/4.99G [00:04<00:25, 165MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 18% 881M/4.99G [00:04<00:22, 181MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 18% 912M/4.99G [00:04<00:20, 198MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 19% 944M/4.99G [00:05<00:19, 206MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 20% 975M/4.99G [00:05<00:22, 175MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 20% 996M/4.99G [00:05<00:33, 120MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 20% 1.02G/4.99G [00:05<00:35, 112MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 21% 1.04G/4.99G [00:05<00:31, 124MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 21% 1.06G/4.99G [00:06<00:29, 135MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 22% 1.08G/4.99G [00:06<00:26, 148MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 22% 1.11G/4.99G [00:06<00:23, 168MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 23% 1.13G/4.99G [00:06<00:22, 168MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 23% 1.15G/4.99G [00:06<00:21, 175MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 24% 1.17G/4.99G [00:06<00:21, 177MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 24% 1.21G/4.99G [00:06<00:19, 190MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 25% 1.23G/4.99G [00:07<00:23, 163MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 25% 1.26G/4.99G [00:07<00:20, 180MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 26% 1.28G/4.99G [00:07<00:20, 179MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 26% 1.30G/4.99G [00:07<00:20, 179MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 26% 1.32G/4.99G [00:07<00:19, 184MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 27% 1.34G/4.99G [00:07<00:19, 183MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 28% 1.37G/4.99G [00:07<00:19, 184MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 28% 1.39G/4.99G [00:07<00:20, 173MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 28% 1.42G/4.99G [00:08<00:21, 168MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 29% 1.44G/4.99G [00:08<00:20, 170MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 29% 1.46G/4.99G [00:08<00:20, 172MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 30% 1.48G/4.99G [00:08<00:20, 173MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 30% 1.50G/4.99G [00:09<01:02, 55.8MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 30% 1.52G/4.99G [00:09<00:49, 69.5MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 31% 1.54G/4.99G [00:09<00:41, 82.5MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 31% 1.56G/4.99G [00:09<00:35, 96.8MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 32% 1.58G/4.99G [00:09<00:31, 109MB/s] \u001b[A\n", - "model-00001-of-00002.safetensors: 32% 1.60G/4.99G [00:10<00:27, 124MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 33% 1.63G/4.99G [00:10<00:33, 100MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 33% 1.66G/4.99G [00:10<00:26, 126MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 34% 1.68G/4.99G [00:10<00:23, 138MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 34% 1.70G/4.99G [00:10<00:22, 147MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 34% 1.72G/4.99G [00:10<00:21, 155MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 35% 1.74G/4.99G [00:10<00:20, 158MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 35% 1.76G/4.99G [00:11<00:19, 166MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 36% 1.78G/4.99G [00:11<00:18, 170MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 36% 1.80G/4.99G [00:11<00:17, 178MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 37% 1.82G/4.99G [00:11<00:18, 174MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 37% 1.85G/4.99G [00:11<00:17, 183MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 37% 1.87G/4.99G [00:11<00:16, 188MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 38% 1.89G/4.99G [00:11<00:16, 183MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 38% 1.92G/4.99G [00:11<00:16, 189MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 39% 1.94G/4.99G [00:12<00:15, 193MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 39% 1.96G/4.99G [00:12<00:15, 192MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 40% 1.99G/4.99G [00:12<00:14, 202MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 41% 2.02G/4.99G [00:12<00:14, 210MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 41% 2.04G/4.99G [00:12<00:14, 210MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 42% 2.08G/4.99G [00:12<00:13, 216MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 42% 2.11G/4.99G [00:12<00:12, 223MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 43% 2.14G/4.99G [00:12<00:13, 216MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 44% 2.17G/4.99G [00:13<00:12, 222MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 44% 2.20G/4.99G [00:13<00:12, 231MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 45% 2.23G/4.99G [00:13<00:11, 238MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 45% 2.26G/4.99G [00:13<00:11, 235MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 46% 2.30G/4.99G [00:13<00:11, 237MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 47% 2.33G/4.99G [00:13<00:11, 238MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 47% 2.36G/4.99G [00:13<00:12, 218MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 48% 2.39G/4.99G [00:14<00:11, 224MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 49% 2.42G/4.99G [00:14<00:10, 235MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 49% 2.45G/4.99G [00:14<00:11, 218MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 50% 2.49G/4.99G [00:14<00:11, 212MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 50% 2.52G/4.99G [00:14<00:11, 217MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 51% 2.55G/4.99G [00:14<00:12, 191MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 52% 2.58G/4.99G [00:14<00:11, 204MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 52% 2.61G/4.99G [00:15<00:10, 216MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 53% 2.64G/4.99G [00:15<00:10, 222MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 54% 2.67G/4.99G [00:15<00:10, 215MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 54% 2.71G/4.99G [00:15<00:11, 200MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 55% 2.73G/4.99G [00:15<00:12, 181MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 55% 2.75G/4.99G [00:15<00:13, 168MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 56% 2.78G/4.99G [00:16<00:12, 173MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 56% 2.80G/4.99G [00:16<00:14, 155MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 57% 2.82G/4.99G [00:16<00:15, 137MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 57% 2.84G/4.99G [00:16<00:14, 149MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 58% 2.87G/4.99G [00:16<00:12, 174MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 58% 2.90G/4.99G [00:16<00:10, 197MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 59% 2.93G/4.99G [00:20<01:26, 23.9MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 59% 2.96G/4.99G [00:20<00:58, 34.6MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 60% 2.99G/4.99G [00:20<00:41, 47.7MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 60% 3.01G/4.99G [00:20<00:33, 58.3MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 61% 3.03G/4.99G [00:20<00:28, 68.6MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 61% 3.05G/4.99G [00:20<00:23, 80.7MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 62% 3.07G/4.99G [00:20<00:20, 92.1MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 62% 3.09G/4.99G [00:20<00:17, 107MB/s] \u001b[A\n", - "model-00001-of-00002.safetensors: 62% 3.11G/4.99G [00:21<00:15, 123MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 63% 3.14G/4.99G [00:21<00:13, 139MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 63% 3.17G/4.99G [00:21<00:11, 155MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 64% 3.19G/4.99G [00:21<00:10, 165MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 65% 3.22G/4.99G [00:21<00:10, 174MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 65% 3.24G/4.99G [00:21<00:09, 180MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 66% 3.27G/4.99G [00:21<00:08, 194MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 66% 3.29G/4.99G [00:21<00:09, 182MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 66% 3.31G/4.99G [00:22<00:14, 119MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 67% 3.33G/4.99G [00:22<00:13, 127MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 67% 3.36G/4.99G [00:22<00:13, 125MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 68% 3.38G/4.99G [00:23<00:17, 92.2MB/s]\u001b[A\n", - "model-00001-of-00002.safetensors: 68% 3.40G/4.99G [00:23<00:16, 95.3MB/s]\u001b[A" + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", + " potential_paths = extract_paths(module)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", + " lambda m: list(m.__path__._path),\n", + " ^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", + " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "Traceback (most recent call last):\n", + " File \"/content/lecture-ai-engineering/day1/02_streamlit_app/llm.py\", line 87, in generate_response\n", + " outputs = pipe(user_question, max_new_tokens=256)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/text2text_generation.py\", line 173, in __call__\n", + " result = super().__call__(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/base.py\", line 1379, in __call__\n", + " return self.run_single(inputs, preprocess_params, forward_params, postprocess_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/base.py\", line 1386, in run_single\n", + " model_outputs = self.forward(model_inputs, **forward_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/base.py\", line 1286, in forward\n", + " model_outputs = self._forward(model_inputs, **forward_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/text2text_generation.py\", line 202, in _forward\n", + " output_ids = self.model.generate(**model_inputs, **generate_kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/torch/utils/_contextlib.py\", line 116, in decorate_context\n", + " return func(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/transformers/generation/utils.py\", line 2225, in generate\n", + " self._validate_model_kwargs(model_kwargs.copy())\n", + " File \"/usr/local/lib/python3.11/dist-packages/transformers/generation/utils.py\", line 1536, in _validate_model_kwargs\n", + " raise ValueError(\n", + "ValueError: The following `model_kwargs` are not used by the model: ['return_full_text'] (note: typos in the generate arguments will also show up in this list)\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "Traceback (most recent call last):\n", + " File \"/content/lecture-ai-engineering/day1/02_streamlit_app/llm.py\", line 87, in generate_response\n", + " outputs = pipe(user_question, max_new_tokens=256)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/text2text_generation.py\", line 173, in __call__\n", + " result = super().__call__(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/base.py\", line 1379, in __call__\n", + " return self.run_single(inputs, preprocess_params, forward_params, postprocess_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/base.py\", line 1386, in run_single\n", + " model_outputs = self.forward(model_inputs, **forward_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/base.py\", line 1286, in forward\n", + " model_outputs = self._forward(model_inputs, **forward_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/text2text_generation.py\", line 202, in _forward\n", + " output_ids = self.model.generate(**model_inputs, **generate_kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/torch/utils/_contextlib.py\", line 116, in decorate_context\n", + " return func(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/transformers/generation/utils.py\", line 2225, in generate\n", + " self._validate_model_kwargs(model_kwargs.copy())\n", + " File \"/usr/local/lib/python3.11/dist-packages/transformers/generation/utils.py\", line 1536, in _validate_model_kwargs\n", + " raise ValueError(\n", + "ValueError: The following `model_kwargs` are not used by the model: ['return_full_text'] (note: typos in the generate arguments will also show up in this list)\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK loaded successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "Device set to use cpu\n", + "2025-05-07 03:39:44.383 Examining the path of torch.classes raised:\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", + " if asyncio.get_running_loop().is_running():\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: no running event loop\n", + "\n", + "During handling of the above exception, another exception occurred:\n", + "\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", + " potential_paths = extract_paths(module)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", + " lambda m: list(m.__path__._path),\n", + " ^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", + " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK loaded successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "2025-05-07 03:43:21.814 Examining the path of torch.classes raised:\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", + " if asyncio.get_running_loop().is_running():\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: no running event loop\n", + "\n", + "During handling of the above exception, another exception occurred:\n", + "\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", + " potential_paths = extract_paths(module)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", + " lambda m: list(m.__path__._path),\n", + " ^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", + " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "NLTK Punkt data checked/downloaded.\n", + "Database 'chat_feedback.db' initialized successfully.\n", + "\u001b[31m──\u001b[0m\u001b[31m────────────────────────\u001b[0m\u001b[31m \u001b[0m\u001b[1;31mTraceback \u001b[0m\u001b[1;2;31m(most recent call last)\u001b[0m\u001b[31m \u001b[0m\u001b[31m─────────────────────────\u001b[0m\u001b[31m──\u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2;33m/usr/local/lib/python3.11/dist-packages/streamlit/runtime/scriptrunner/\u001b[0m\u001b[1;33mexec_code.py\u001b[0m: \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[94m121\u001b[0m in \u001b[92mexec_func_with_error_handling\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2;33m/usr/local/lib/python3.11/dist-packages/streamlit/runtime/scriptrunner/\u001b[0m\u001b[1;33mscript_runner\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[1;33m.py\u001b[0m:\u001b[94m648\u001b[0m in \u001b[92mcode_to_exec\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2;33m/content/lecture-ai-engineering/day1/02_streamlit_app/\u001b[0m\u001b[1;33mapp.py\u001b[0m:\u001b[94m71\u001b[0m in \u001b[92m\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m68 \u001b[0m\u001b[2m# --- メインコンテンツ ---\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m69 \u001b[0m\u001b[94mif\u001b[0m st.session_state.page == \u001b[33m\"\u001b[0m\u001b[33mチャット\u001b[0m\u001b[33m\"\u001b[0m: \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m70 \u001b[0m\u001b[2m│ \u001b[0m\u001b[94mif\u001b[0m pipe: \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m❱ \u001b[0m71 \u001b[2m│ │ \u001b[0m\u001b[1;4mui.display_chat_page(pipe)\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m72 \u001b[0m\u001b[2m│ \u001b[0m\u001b[94melse\u001b[0m: \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m73 \u001b[0m\u001b[2m│ │ \u001b[0mst.error(\u001b[33m\"\u001b[0m\u001b[33mチャット機能を利用できません。モデルの読み込みに失敗しました \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m74 \u001b[0m\u001b[94melif\u001b[0m st.session_state.page == \u001b[33m\"\u001b[0m\u001b[33m履歴閲覧\u001b[0m\u001b[33m\"\u001b[0m: \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2;33m/content/lecture-ai-engineering/day1/02_streamlit_app/\u001b[0m\u001b[1;33mui.py\u001b[0m:\u001b[94m50\u001b[0m in \u001b[92mdisplay_chat_page\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 47 \u001b[0m\u001b[2m│ │ \u001b[0mst.session_state.feedback_given = \u001b[94mFalse\u001b[0m \u001b[2m# フィードバック状態もリセット\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 48 \u001b[0m\u001b[2m│ │ \u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 49 \u001b[0m\u001b[2m│ │ \u001b[0m\u001b[94mwith\u001b[0m st.spinner(\u001b[33m\"\u001b[0m\u001b[33mモデルが回答を生成中...\u001b[0m\u001b[33m\"\u001b[0m): \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[31m❱ \u001b[0m 50 \u001b[2m│ │ │ \u001b[0m\u001b[1;4manswer, response_time\u001b[0m = generate_response(pipe, user_question) \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 51 \u001b[0m\u001b[2m│ │ │ \u001b[0mst.session_state.current_answer = answer \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 52 \u001b[0m\u001b[2m│ │ │ \u001b[0mst.session_state.response_time = response_time \u001b[31m \u001b[0m\n", + "\u001b[31m \u001b[0m \u001b[2m 53 \u001b[0m\u001b[2m│ │ │ \u001b[0m\u001b[2m# ここでrerunすると回答とフィードバックが一度に表示される\u001b[0m \u001b[31m \u001b[0m\n", + "\u001b[31m────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n", + "\u001b[1;91mTypeError: \u001b[0mcannot unpack non-iterable NoneType object\n" ] } ], @@ -742,7 +1061,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 17, "metadata": { "id": "WFJC2TmZELSP" }, From 5570dad91460734d3f50a82380486e7eb50640e3 Mon Sep 17 00:00:00 2001 From: Dalby123 Date: Wed, 7 May 2025 16:38:21 +0900 Subject: [PATCH 5/5] =?UTF-8?q?Colab=20=E3=82=92=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E3=81=97=E3=81=A6=E4=BD=9C=E6=88=90=E3=81=95=E3=82=8C=E3=81=BE?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- day1/day1_practice.ipynb | 872 ++++++++++++++++----------------------- 1 file changed, 367 insertions(+), 505 deletions(-) diff --git a/day1/day1_practice.ipynb b/day1/day1_practice.ipynb index 5e3b1e7e3..8fdbdee30 100644 --- a/day1/day1_practice.ipynb +++ b/day1/day1_practice.ipynb @@ -59,13 +59,13 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 17, "metadata": { "id": "AIXMavdDEP8U", "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "9175b913-20cb-4fd7-b77b-12b5c6cc428c" + "outputId": "ba662f2d-79b4-4cfb-bbad-d1a0f51536da" }, "outputs": [ { @@ -73,15 +73,17 @@ "name": "stdout", "text": [ "Cloning into 'lecture-ai-engineering'...\n", - "remote: Enumerating objects: 52, done.\u001b[K\n", - "remote: Total 52 (delta 0), reused 0 (delta 0), pack-reused 52 (from 1)\u001b[K\n", - "Receiving objects: 100% (52/52), 83.21 KiB | 6.93 MiB/s, done.\n", - "Resolving deltas: 100% (9/9), done.\n" + "remote: Enumerating objects: 68, done.\u001b[K\n", + "remote: Counting objects: 100% (10/10), done.\u001b[K\n", + "remote: Compressing objects: 100% (7/7), done.\u001b[K\n", + "remote: Total 68 (delta 6), reused 3 (delta 3), pack-reused 58 (from 2)\u001b[K\n", + "Receiving objects: 100% (68/68), 97.84 KiB | 538.00 KiB/s, done.\n", + "Resolving deltas: 100% (15/15), done.\n" ] } ], "source": [ - "!git clone https://github.com/matsuolab/lecture-ai-engineering.git" + "!git clone https://github.com/Dalby1379/lecture-ai-engineering.git" ] }, { @@ -131,13 +133,13 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 18, "metadata": { "id": "bvEowFfg5lrq", "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "20eda009-7258-47a1-fb66-008530516679" + "outputId": "38d7bead-d1fe-424d-bf9f-ad11999d5488" }, "outputs": [ { @@ -156,7 +158,7 @@ ] }, "metadata": {}, - "execution_count": 3 + "execution_count": 18 } ], "source": [ @@ -180,13 +182,13 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 19, "metadata": { "id": "S28XgOm0ELSM", "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "25f94a40-3867-4409-db4b-cdc7d72ab03e" + "outputId": "3f8a9397-3692-4020-b790-3b5acc9c8cfa" }, "outputs": [ { @@ -212,7 +214,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 20, "metadata": { "id": "nBe41LFiELSN" }, @@ -233,13 +235,13 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 21, "metadata": { "id": "aYw1q0iXELSN", "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "6fce0e86-a0d2-4a3a-ef02-a68745a21769" + "outputId": "b837750c-4a88-4321-bdcc-43dddf5c276f" }, "outputs": [ { @@ -265,20 +267,20 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 22, "metadata": { "id": "f-E7ucR6ELSN", "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "0a4e7054-0978-40df-8996-7a3632ed9a0f" + "outputId": "59d91208-e425-4895-8817-5c6c11951a45" }, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ - "公開URL: https://8344-34-86-114-155.ngrok-free.app\n", + "公開URL: https://b894-34-16-191-174.ngrok-free.app\n", "\n", "Collecting usage statistics. To deactivate, set browser.gatherUsageStats to false.\n", "\u001b[0m\n", @@ -287,10 +289,96 @@ "\u001b[0m\n", "\u001b[34m Local URL: \u001b[0m\u001b[1mhttp://localhost:8501\u001b[0m\n", "\u001b[34m Network URL: \u001b[0m\u001b[1mhttp://172.28.0.12:8501\u001b[0m\n", - "\u001b[34m External URL: \u001b[0m\u001b[1mhttp://34.86.114.155:8501\u001b[0m\n", - "\u001b[0m\n", + "\u001b[34m External URL: \u001b[0m\u001b[1mhttp://34.16.191.174:8501\u001b[0m\n", + "\u001b[0m\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "WARNING:pyngrok.process.ngrok:t=2025-05-07T07:32:47+0000 lvl=warn msg=\"Stopping forwarder\" name=http-8501-83370f39-aea1-4253-9094-67ca4b921f38 acceptErr=\"failed to accept connection: Listener closed\"\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ "\u001b[34m Stopping...\u001b[0m\n", - "^C\n" + "Traceback (most recent call last):\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", + " if asyncio.get_running_loop().is_running():\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: no running event loop\n", + "\n", + "During handling of the above exception, another exception occurred:\n", + "\n", + "Traceback (most recent call last):\n", + " File \"/usr/local/bin/streamlit\", line 8, in \n", + " sys.exit(main())\n", + " ^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/click/core.py\", line 1161, in __call__\n", + " return self.main(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/click/core.py\", line 1082, in main\n", + " rv = self.invoke(ctx)\n", + " ^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/click/core.py\", line 1697, in invoke\n", + " return _process_result(sub_ctx.command.invoke(sub_ctx))\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/click/core.py\", line 1443, in invoke\n", + " return ctx.invoke(self.callback, **ctx.params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/click/core.py\", line 788, in invoke\n", + " return __callback(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/cli.py\", line 240, in main_run\n", + " _main_run(target, args, flag_options=kwargs)\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/cli.py\", line 276, in _main_run\n", + " bootstrap.run(file, is_hello, args, flag_options)\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 355, in run\n", + " asyncio.run(main())\n", + " File \"/usr/lib/python3.11/asyncio/runners.py\", line 190, in run\n", + " return runner.run(main)\n", + " ^^^^^^^^^^^^^^^^\n", + " File \"/usr/lib/python3.11/asyncio/runners.py\", line 118, in run\n", + " return self._loop.run_until_complete(task)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/lib/python3.11/asyncio/base_events.py\", line 641, in run_until_complete\n", + " self.run_forever()\n", + " File \"/usr/lib/python3.11/asyncio/base_events.py\", line 608, in run_forever\n", + " self._run_once()\n", + " File \"/usr/lib/python3.11/asyncio/base_events.py\", line 1898, in _run_once\n", + " event_list = self._selector.select(timeout)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/lib/python3.11/selectors.py\", line 468, in select\n", + " fd_event_list = self._selector.poll(timeout, max_ev)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 44, in signal_handler\n", + " server.stop()\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/server/server.py\", line 468, in stop\n", + " cli_util.print_to_cli(\" Stopping...\", fg=\"blue\")\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/cli_util.py\", line 34, in print_to_cli\n", + " click.secho(message, **kwargs)\n", + " File \"/usr/local/lib/python3.11/dist-packages/click/termui.py\", line 634, in secho\n", + " return echo(message, file=file, nl=nl, err=err, color=color)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/click/utils.py\", line 318, in echo\n", + " file.write(out) # type: ignore\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 44, in signal_handler\n", + " server.stop()\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/server/server.py\", line 468, in stop\n", + " cli_util.print_to_cli(\" Stopping...\", fg=\"blue\")\n", + " File \"/usr/local/lib/python3.11/dist-packages/streamlit/cli_util.py\", line 34, in print_to_cli\n", + " click.secho(message, **kwargs)\n", + " File \"/usr/local/lib/python3.11/dist-packages/click/termui.py\", line 634, in secho\n", + " return echo(message, file=file, nl=nl, err=err, color=color)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.11/dist-packages/click/utils.py\", line 318, in echo\n", + " file.write(out) # type: ignore\n", + " ^^^^^^^^^^^^^^^\n", + "RuntimeError: reentrant call inside <_io.BufferedWriter name=''>\n" ] } ], @@ -330,7 +418,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": { "id": "8Ek9QgahELSO" }, @@ -361,23 +449,11 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "metadata": { - "id": "UeEjlJ7uELSO", - "colab": { - "base_uri": "https://localhost:8080/" - }, - "outputId": "41b6fe82-3e2f-49e3-8609-63cd66d2f77a" + "id": "UeEjlJ7uELSO" }, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "/content/lecture-ai-engineering/day1/02_streamlit_app\n" - ] - } - ], + "outputs": [], "source": [ "%cd /content/lecture-ai-engineering/day1/02_streamlit_app" ] @@ -393,7 +469,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 25, "metadata": { "id": "mDqvI4V3ELSO" }, @@ -414,13 +490,13 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 26, "metadata": { "id": "jPxTiEWQELSO", "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "13c951a8-2f1a-48f2-a7e4-a8c267c44e0b" + "outputId": "74607ae1-fb2c-436f-8af1-34f48986d563" }, "outputs": [ { @@ -453,7 +529,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "metadata": { "id": "W184-a7qFP0W" }, @@ -499,17 +575,14 @@ "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "4046d29b-e6d9-459f-a670-2bb9d46936af" + "outputId": "e25147b6-63bf-4e27-f26d-10c561012857" }, "outputs": [ { - "metadata": { - "tags": null - }, - "name": "stdout", "output_type": "stream", + "name": "stdout", "text": [ - "公開URL: https://b306-34-86-114-155.ngrok-free.app\n", + "公開URL: https://c2de-34-16-191-174.ngrok-free.app\n", "\n", "Collecting usage statistics. To deactivate, set browser.gatherUsageStats to false.\n", "\u001b[0m\n", @@ -518,454 +591,277 @@ "\u001b[0m\n", "\u001b[34m Local URL: \u001b[0m\u001b[1mhttp://localhost:8501\u001b[0m\n", "\u001b[34m Network URL: \u001b[0m\u001b[1mhttp://172.28.0.12:8501\u001b[0m\n", - "\u001b[34m External URL: \u001b[0m\u001b[1mhttp://34.86.114.155:8501\u001b[0m\n", + "\u001b[34m External URL: \u001b[0m\u001b[1mhttp://34.16.191.174:8501\u001b[0m\n", "\u001b[0m\n", "NLTK loaded successfully.\n", - "2025-05-07 03:23:39.872600: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n", + "2025-05-07 07:33:25.042233: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n", "WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n", - "E0000 00:00:1746588219.927042 8349 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n", - "E0000 00:00:1746588219.942220 8349 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n", - "2025-05-07 03:23:39.997841: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n", + "E0000 00:00:1746603205.380803 18892 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n", + "E0000 00:00:1746603205.476568 18892 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n", + "2025-05-07 07:33:26.208483: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n", "To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n", "NLTK Punkt data checked/downloaded.\n", "Database 'chat_feedback.db' initialized successfully.\n", - "config.json: 100% 1.40k/1.40k [00:00<00:00, 6.10MB/s]\n", - "Xet Storage is enabled for this repo, but the 'hf_xet' package is not installed. Falling back to regular HTTP download. For better performance, install the package with: `pip install huggingface_hub[hf_xet]` or `pip install hf_xet`\n", - "model.safetensors: 100% 990M/990M [00:09<00:00, 104MB/s] \n", - "generation_config.json: 100% 147/147 [00:00<00:00, 652kB/s]\n", - "tokenizer_config.json: 100% 2.54k/2.54k [00:00<00:00, 13.0MB/s]\n", - "Xet Storage is enabled for this repo, but the 'hf_xet' package is not installed. Falling back to regular HTTP download. For better performance, install the package with: `pip install huggingface_hub[hf_xet]` or `pip install hf_xet`\n", - "spiece.model: 100% 792k/792k [00:00<00:00, 247MB/s]\n", - "tokenizer.json: 100% 2.42M/2.42M [00:00<00:00, 38.2MB/s]\n", - "special_tokens_map.json: 100% 2.20k/2.20k [00:00<00:00, 11.4MB/s]\n", - "Device set to use cpu\n", - "The model 'T5ForConditionalGeneration' is not supported for text-generation. Supported models are ['AriaTextForCausalLM', 'BambaForCausalLM', 'BartForCausalLM', 'BertLMHeadModel', 'BertGenerationDecoder', 'BigBirdForCausalLM', 'BigBirdPegasusForCausalLM', 'BioGptForCausalLM', 'BlenderbotForCausalLM', 'BlenderbotSmallForCausalLM', 'BloomForCausalLM', 'CamembertForCausalLM', 'LlamaForCausalLM', 'CodeGenForCausalLM', 'CohereForCausalLM', 'Cohere2ForCausalLM', 'CpmAntForCausalLM', 'CTRLLMHeadModel', 'Data2VecTextForCausalLM', 'DbrxForCausalLM', 'DeepseekV3ForCausalLM', 'DiffLlamaForCausalLM', 'ElectraForCausalLM', 'Emu3ForCausalLM', 'ErnieForCausalLM', 'FalconForCausalLM', 'FalconMambaForCausalLM', 'FuyuForCausalLM', 'GemmaForCausalLM', 'Gemma2ForCausalLM', 'Gemma3ForConditionalGeneration', 'Gemma3ForCausalLM', 'GitForCausalLM', 'GlmForCausalLM', 'Glm4ForCausalLM', 'GotOcr2ForConditionalGeneration', 'GPT2LMHeadModel', 'GPT2LMHeadModel', 'GPTBigCodeForCausalLM', 'GPTNeoForCausalLM', 'GPTNeoXForCausalLM', 'GPTNeoXJapaneseForCausalLM', 'GPTJForCausalLM', 'GraniteForCausalLM', 'GraniteMoeForCausalLM', 'GraniteMoeSharedForCausalLM', 'HeliumForCausalLM', 'JambaForCausalLM', 'JetMoeForCausalLM', 'LlamaForCausalLM', 'Llama4ForCausalLM', 'Llama4ForCausalLM', 'MambaForCausalLM', 'Mamba2ForCausalLM', 'MarianForCausalLM', 'MBartForCausalLM', 'MegaForCausalLM', 'MegatronBertForCausalLM', 'MistralForCausalLM', 'MixtralForCausalLM', 'MllamaForCausalLM', 'MoshiForCausalLM', 'MptForCausalLM', 'MusicgenForCausalLM', 'MusicgenMelodyForCausalLM', 'MvpForCausalLM', 'NemotronForCausalLM', 'OlmoForCausalLM', 'Olmo2ForCausalLM', 'OlmoeForCausalLM', 'OpenLlamaForCausalLM', 'OpenAIGPTLMHeadModel', 'OPTForCausalLM', 'PegasusForCausalLM', 'PersimmonForCausalLM', 'PhiForCausalLM', 'Phi3ForCausalLM', 'Phi4MultimodalForCausalLM', 'PhimoeForCausalLM', 'PLBartForCausalLM', 'ProphetNetForCausalLM', 'QDQBertLMHeadModel', 'Qwen2ForCausalLM', 'Qwen2MoeForCausalLM', 'Qwen3ForCausalLM', 'Qwen3MoeForCausalLM', 'RecurrentGemmaForCausalLM', 'ReformerModelWithLMHead', 'RemBertForCausalLM', 'RobertaForCausalLM', 'RobertaPreLayerNormForCausalLM', 'RoCBertForCausalLM', 'RoFormerForCausalLM', 'RwkvForCausalLM', 'Speech2Text2ForCausalLM', 'StableLmForCausalLM', 'Starcoder2ForCausalLM', 'TransfoXLLMHeadModel', 'TrOCRForCausalLM', 'WhisperForCausalLM', 'XGLMForCausalLM', 'XLMWithLMHeadModel', 'XLMProphetNetForCausalLM', 'XLMRobertaForCausalLM', 'XLMRobertaXLForCausalLM', 'XLNetLMHeadModel', 'XmodForCausalLM', 'ZambaForCausalLM', 'Zamba2ForCausalLM'].\n", - "2025-05-07 03:24:00.562 Examining the path of torch.classes raised:\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", - " if asyncio.get_running_loop().is_running():\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: no running event loop\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "Data saved to DB successfully.\n", + "config.json: 100% 805/805 [00:00<00:00, 5.21MB/s]\n", + "model.safetensors.index.json: 100% 24.2k/24.2k [00:00<00:00, 70.1MB/s]\n", + "Fetching 2 files: 0% 0/2 [00:00\n", - " lambda m: list(m.__path__._path),\n", - " ^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", - " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK loaded successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "2025-05-07 03:27:36.457 Examining the path of torch.classes raised:\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", - " if asyncio.get_running_loop().is_running():\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: no running event loop\n", + "model-00002-of-00002.safetensors: 4% 10.5M/241M [00:00<00:03, 61.2MB/s]\u001b[A\u001b[A\n", + "model-00001-of-00002.safetensors: 0% 21.0M/4.99G [00:00<01:12, 68.7MB/s]\u001b[A\n", "\n", - "During handling of the above exception, another exception occurred:\n", + "model-00002-of-00002.safetensors: 9% 21.0M/241M [00:00<00:03, 62.5MB/s]\u001b[A\u001b[A\n", + "model-00001-of-00002.safetensors: 1% 31.5M/4.99G [00:00<01:04, 77.1MB/s]\u001b[A\n", "\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", - " potential_paths = extract_paths(module)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", - " lambda m: list(m.__path__._path),\n", - " ^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", - " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK loaded successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "2025-05-07 03:30:14.999 Examining the path of torch.classes raised:\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", - " if asyncio.get_running_loop().is_running():\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: no running event loop\n", + "model-00002-of-00002.safetensors: 17% 41.9M/241M [00:00<00:02, 90.5MB/s]\u001b[A\u001b[A\n", + "model-00001-of-00002.safetensors: 1% 52.4M/4.99G [00:00<00:50, 97.7MB/s]\u001b[A\n", "\n", - "During handling of the above exception, another exception occurred:\n", + "model-00002-of-00002.safetensors: 22% 52.4M/241M [00:00<00:02, 91.3MB/s]\u001b[A\u001b[A\n", + "model-00001-of-00002.safetensors: 1% 62.9M/4.99G [00:00<00:49, 99.4MB/s]\u001b[A\n", "\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", - " potential_paths = extract_paths(module)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", - " lambda m: list(m.__path__._path),\n", - " ^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", - " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", - "NLTK loaded successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "\u001b[31m──\u001b[0m\u001b[31m────────────────────────\u001b[0m\u001b[31m \u001b[0m\u001b[1;31mTraceback \u001b[0m\u001b[1;2;31m(most recent call last)\u001b[0m\u001b[31m \u001b[0m\u001b[31m─────────────────────────\u001b[0m\u001b[31m──\u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2;33m/usr/local/lib/python3.11/dist-packages/streamlit/runtime/scriptrunner/\u001b[0m\u001b[1;33mexec_code.py\u001b[0m: \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[94m121\u001b[0m in \u001b[92mexec_func_with_error_handling\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2;33m/usr/local/lib/python3.11/dist-packages/streamlit/runtime/scriptrunner/\u001b[0m\u001b[1;33mscript_runner\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[1;33m.py\u001b[0m:\u001b[94m648\u001b[0m in \u001b[92mcode_to_exec\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2;33m/content/lecture-ai-engineering/day1/02_streamlit_app/\u001b[0m\u001b[1;33mapp.py\u001b[0m:\u001b[94m71\u001b[0m in \u001b[92m\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m68 \u001b[0m\u001b[2m# --- メインコンテンツ ---\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m69 \u001b[0m\u001b[94mif\u001b[0m st.session_state.page == \u001b[33m\"\u001b[0m\u001b[33mチャット\u001b[0m\u001b[33m\"\u001b[0m: \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m70 \u001b[0m\u001b[2m│ \u001b[0m\u001b[94mif\u001b[0m pipe: \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m❱ \u001b[0m71 \u001b[2m│ │ \u001b[0m\u001b[1;4mui.display_chat_page(pipe)\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m72 \u001b[0m\u001b[2m│ \u001b[0m\u001b[94melse\u001b[0m: \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m73 \u001b[0m\u001b[2m│ │ \u001b[0mst.error(\u001b[33m\"\u001b[0m\u001b[33mチャット機能を利用できません。モデルの読み込みに失敗しました \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m74 \u001b[0m\u001b[94melif\u001b[0m st.session_state.page == \u001b[33m\"\u001b[0m\u001b[33m履歴閲覧\u001b[0m\u001b[33m\"\u001b[0m: \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2;33m/content/lecture-ai-engineering/day1/02_streamlit_app/\u001b[0m\u001b[1;33mui.py\u001b[0m:\u001b[94m17\u001b[0m in \u001b[92mdisplay_chat_page\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 14 \u001b[0m\u001b[2m│ \u001b[0muser_question = st.text_area(\u001b[33m\"\u001b[0m\u001b[33m質問\u001b[0m\u001b[33m\"\u001b[0m, key=\u001b[33m\"\u001b[0m\u001b[33mquestion_input\u001b[0m\u001b[33m\"\u001b[0m, height=\u001b[94m100\u001b[0m, val \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 15 \u001b[0m\u001b[2m│ \u001b[0msubmit_button = st.button(\u001b[33m\"\u001b[0m\u001b[33m質問を送信\u001b[0m\u001b[33m\"\u001b[0m) \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 16 \u001b[0m\u001b[2m│ \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m❱ \u001b[0m 17 \u001b[2m│ \u001b[0m\u001b[2m# セッション状態の初期化(安全のため)\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 18 \u001b[0m\u001b[2m│ \u001b[0m\u001b[94mif\u001b[0m \u001b[33m\"\u001b[0m\u001b[33mcurrent_question\u001b[0m\u001b[33m\"\u001b[0m \u001b[95mnot\u001b[0m \u001b[95min\u001b[0m st.session_state: \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 19 \u001b[0m\u001b[2m│ │ \u001b[0mst.session_state.current_question = \u001b[33m\"\u001b[0m\u001b[33m\"\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 20 \u001b[0m\u001b[2m│ \u001b[0m\u001b[94mif\u001b[0m \u001b[33m\"\u001b[0m\u001b[33mcurrent_answer\u001b[0m\u001b[33m\"\u001b[0m \u001b[95mnot\u001b[0m \u001b[95min\u001b[0m st.session_state: \u001b[31m \u001b[0m\n", - "\u001b[31m────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n", - "\u001b[1;91mNameError: \u001b[0mname \u001b[32m'TEMPLATES'\u001b[0m is not defined\n", - "2025-05-07 03:32:36.898 Examining the path of torch.classes raised:\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", - " if asyncio.get_running_loop().is_running():\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: no running event loop\n", + "model-00002-of-00002.safetensors: 30% 73.4M/241M [00:00<00:01, 98.3MB/s]\u001b[A\u001b[A\n", + "model-00001-of-00002.safetensors: 1% 73.4M/4.99G [00:00<01:00, 81.3MB/s]\u001b[A\n", "\n", - "During handling of the above exception, another exception occurred:\n", + "model-00002-of-00002.safetensors: 35% 83.9M/241M [00:00<00:01, 85.5MB/s]\u001b[A\u001b[A\n", + "model-00001-of-00002.safetensors: 2% 83.9M/4.99G [00:01<01:03, 76.7MB/s]\u001b[A\n", "\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", - " potential_paths = extract_paths(module)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", - " lambda m: list(m.__path__._path),\n", - " ^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", - " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", - "NLTK loaded successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "2025-05-07 03:33:13.691 Examining the path of torch.classes raised:\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", - " if asyncio.get_running_loop().is_running():\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: no running event loop\n", + "model-00002-of-00002.safetensors: 39% 94.4M/241M [00:01<00:01, 83.7MB/s]\u001b[A\u001b[A\n", + "model-00001-of-00002.safetensors: 2% 94.4M/4.99G [00:01<01:04, 76.1MB/s]\u001b[A\n", "\n", - "During handling of the above exception, another exception occurred:\n", + "model-00002-of-00002.safetensors: 44% 105M/241M [00:01<00:01, 80.0MB/s] \u001b[A\u001b[A\n", + "model-00001-of-00002.safetensors: 2% 105M/4.99G [00:01<01:05, 74.5MB/s] \u001b[A\n", "\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", - " potential_paths = extract_paths(module)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", - " lambda m: list(m.__path__._path),\n", - " ^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", - " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK loaded successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "2025-05-07 03:34:44.679 Examining the path of torch.classes raised:\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", - " if asyncio.get_running_loop().is_running():\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: no running event loop\n", + "model-00002-of-00002.safetensors: 48% 115M/241M [00:01<00:01, 68.2MB/s]\u001b[A\u001b[A\n", + "model-00001-of-00002.safetensors: 2% 115M/4.99G [00:01<01:13, 66.1MB/s]\u001b[A\n", "\n", - "During handling of the above exception, another exception occurred:\n", + "model-00002-of-00002.safetensors: 52% 126M/241M [00:01<00:01, 72.6MB/s]\u001b[A\u001b[A\n", + "model-00001-of-00002.safetensors: 3% 126M/4.99G [00:01<01:11, 68.2MB/s]\u001b[A\n", "\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", - " potential_paths = extract_paths(module)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", - " lambda m: list(m.__path__._path),\n", - " ^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", - " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK loaded successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "2025-05-07 03:37:08.265 Examining the path of torch.classes raised:\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", - " if asyncio.get_running_loop().is_running():\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: no running event loop\n", + "model-00002-of-00002.safetensors: 57% 136M/241M [00:01<00:01, 75.9MB/s]\u001b[A\u001b[A\n", + "model-00001-of-00002.safetensors: 3% 136M/4.99G [00:01<01:07, 71.9MB/s]\u001b[A\n", "\n", - "During handling of the above exception, another exception occurred:\n", + "model-00002-of-00002.safetensors: 61% 147M/241M [00:02<00:01, 52.1MB/s]\u001b[A\u001b[A\n", + "model-00001-of-00002.safetensors: 3% 147M/4.99G [00:02<03:05, 26.1MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 3% 157M/4.99G [00:04<06:03, 13.3MB/s]\u001b[A\n", "\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", - " potential_paths = extract_paths(module)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", - " lambda m: list(m.__path__._path),\n", - " ^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", - " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK loaded successfully.\n", - "\u001b[31m──\u001b[0m\u001b[31m────────────────────────\u001b[0m\u001b[31m \u001b[0m\u001b[1;31mTraceback \u001b[0m\u001b[1;2;31m(most recent call last)\u001b[0m\u001b[31m \u001b[0m\u001b[31m─────────────────────────\u001b[0m\u001b[31m──\u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2;33m/usr/local/lib/python3.11/dist-packages/streamlit/runtime/scriptrunner/\u001b[0m\u001b[1;33mexec_code.py\u001b[0m: \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[94m121\u001b[0m in \u001b[92mexec_func_with_error_handling\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2;33m/usr/local/lib/python3.11/dist-packages/streamlit/runtime/scriptrunner/\u001b[0m\u001b[1;33mscript_runner\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[1;33m.py\u001b[0m:\u001b[94m648\u001b[0m in \u001b[92mcode_to_exec\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2;33m/content/lecture-ai-engineering/day1/02_streamlit_app/\u001b[0m\u001b[1;33mapp.py\u001b[0m:\u001b[94m3\u001b[0m in \u001b[92m\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 1 \u001b[0m\u001b[2m# app.py\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 2 \u001b[0m\u001b[94mimport\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mstreamlit\u001b[0m\u001b[90m \u001b[0m\u001b[94mas\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mst\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m❱ \u001b[0m 3 \u001b[1;4;94mimport\u001b[0m\u001b[1;4;90m \u001b[0m\u001b[1;4;96mui\u001b[0m \u001b[2m# UIモジュール\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 4 \u001b[0m\u001b[94mimport\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mllm\u001b[0m \u001b[2m# LLMモジュール\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 5 \u001b[0m\u001b[94mimport\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mdatabase\u001b[0m \u001b[2m# データベースモジュール\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 6 \u001b[0m\u001b[94mimport\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mmetrics\u001b[0m \u001b[2m# 評価指標モジュール\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2;33m/content/lecture-ai-engineering/day1/02_streamlit_app/\u001b[0m\u001b[1;33mui.py\u001b[0m:\u001b[94m6\u001b[0m in \u001b[92m\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 3 \u001b[0m\u001b[94mimport\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mpandas\u001b[0m\u001b[90m \u001b[0m\u001b[94mas\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mpd\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 4 \u001b[0m\u001b[94mimport\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mtime\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 5 \u001b[0m\u001b[94mfrom\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mdatabase\u001b[0m\u001b[90m \u001b[0m\u001b[94mimport\u001b[0m save_to_db, get_chat_history, get_db_count, clear_db \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m❱ \u001b[0m 6 \u001b[1;4;94mfrom\u001b[0m\u001b[1;4;90m \u001b[0m\u001b[1;4;96mllm\u001b[0m\u001b[1;4;90m \u001b[0m\u001b[1;4;94mimport\u001b[0m\u001b[1;4m generate_response\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 7 \u001b[0m\u001b[94mfrom\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mdata\u001b[0m\u001b[90m \u001b[0m\u001b[94mimport\u001b[0m create_sample_evaluation_data \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 8 \u001b[0m\u001b[94mfrom\u001b[0m\u001b[90m \u001b[0m\u001b[4;96mmetrics\u001b[0m\u001b[90m \u001b[0m\u001b[94mimport\u001b[0m get_metrics_descriptions \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 9 \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n", - "\u001b[91m────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n", - "\u001b[91m \u001b[0m \u001b[2;33m /content/lecture-ai-engineering/day1/02_streamlit_app/\u001b[0m\u001b[1;33mllm.py\u001b[0m\u001b[1m:\u001b[0m\u001b[1;94m25\u001b[0m \u001b[91m \u001b[0m\n", - "\u001b[91m \u001b[0m \u001b[33mdevice\u001b[0m=\u001b[35mdevice\u001b[0m \u001b[91m \u001b[0m\n", - "\u001b[91m \u001b[0m \u001b[1;91m▲\u001b[0m \u001b[91m \u001b[0m\n", - "\u001b[91m────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n", - "\u001b[1;91mSyntaxError: \u001b[0minvalid syntax. Perhaps you forgot a comma?\n", - "2025-05-07 03:38:24.603 Examining the path of torch.classes raised:\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", - " if asyncio.get_running_loop().is_running():\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: no running event loop\n", + "model-00002-of-00002.safetensors: 65% 157M/241M [00:04<00:06, 12.4MB/s]\u001b[A\u001b[A\n", + "model-00001-of-00002.safetensors: 4% 178M/4.99G [00:04<03:31, 22.7MB/s]\u001b[A\n", "\n", - "During handling of the above exception, another exception occurred:\n", + "model-00002-of-00002.safetensors: 74% 178M/241M [00:04<00:02, 21.3MB/s]\u001b[A\u001b[A\n", + "model-00001-of-00002.safetensors: 4% 199M/4.99G [00:04<02:20, 34.1MB/s]\u001b[A\n", "\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", - " potential_paths = extract_paths(module)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", - " lambda m: list(m.__path__._path),\n", - " ^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", - " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "Device set to use cpu\n", - "2025-05-07 03:38:43.992 Examining the path of torch.classes raised:\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", - " if asyncio.get_running_loop().is_running():\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: no running event loop\n", + "model-00002-of-00002.safetensors: 83% 199M/241M [00:04<00:01, 31.8MB/s]\u001b[A\u001b[A\n", "\n", - "During handling of the above exception, another exception occurred:\n", + "model-00002-of-00002.safetensors: 87% 210M/241M [00:04<00:00, 36.4MB/s]\u001b[A\u001b[A\n", + "model-00001-of-00002.safetensors: 4% 220M/4.99G [00:05<01:47, 44.3MB/s]\u001b[A\n", "\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", - " potential_paths = extract_paths(module)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", - " lambda m: list(m.__path__._path),\n", - " ^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", - " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "Traceback (most recent call last):\n", - " File \"/content/lecture-ai-engineering/day1/02_streamlit_app/llm.py\", line 87, in generate_response\n", - " outputs = pipe(user_question, max_new_tokens=256)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/text2text_generation.py\", line 173, in __call__\n", - " result = super().__call__(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/base.py\", line 1379, in __call__\n", - " return self.run_single(inputs, preprocess_params, forward_params, postprocess_params)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/base.py\", line 1386, in run_single\n", - " model_outputs = self.forward(model_inputs, **forward_params)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/base.py\", line 1286, in forward\n", - " model_outputs = self._forward(model_inputs, **forward_params)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/text2text_generation.py\", line 202, in _forward\n", - " output_ids = self.model.generate(**model_inputs, **generate_kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/torch/utils/_contextlib.py\", line 116, in decorate_context\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/transformers/generation/utils.py\", line 2225, in generate\n", - " self._validate_model_kwargs(model_kwargs.copy())\n", - " File \"/usr/local/lib/python3.11/dist-packages/transformers/generation/utils.py\", line 1536, in _validate_model_kwargs\n", - " raise ValueError(\n", - "ValueError: The following `model_kwargs` are not used by the model: ['return_full_text'] (note: typos in the generate arguments will also show up in this list)\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "Traceback (most recent call last):\n", - " File \"/content/lecture-ai-engineering/day1/02_streamlit_app/llm.py\", line 87, in generate_response\n", - " outputs = pipe(user_question, max_new_tokens=256)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/text2text_generation.py\", line 173, in __call__\n", - " result = super().__call__(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/base.py\", line 1379, in __call__\n", - " return self.run_single(inputs, preprocess_params, forward_params, postprocess_params)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/base.py\", line 1386, in run_single\n", - " model_outputs = self.forward(model_inputs, **forward_params)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/base.py\", line 1286, in forward\n", - " model_outputs = self._forward(model_inputs, **forward_params)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/transformers/pipelines/text2text_generation.py\", line 202, in _forward\n", - " output_ids = self.model.generate(**model_inputs, **generate_kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/torch/utils/_contextlib.py\", line 116, in decorate_context\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/transformers/generation/utils.py\", line 2225, in generate\n", - " self._validate_model_kwargs(model_kwargs.copy())\n", - " File \"/usr/local/lib/python3.11/dist-packages/transformers/generation/utils.py\", line 1536, in _validate_model_kwargs\n", - " raise ValueError(\n", - "ValueError: The following `model_kwargs` are not used by the model: ['return_full_text'] (note: typos in the generate arguments will also show up in this list)\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK loaded successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "Device set to use cpu\n", - "2025-05-07 03:39:44.383 Examining the path of torch.classes raised:\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", - " if asyncio.get_running_loop().is_running():\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: no running event loop\n", + "model-00002-of-00002.safetensors: 91% 220M/241M [00:05<00:00, 42.2MB/s]\u001b[A\u001b[A\n", "\n", - "During handling of the above exception, another exception occurred:\n", + "model-00002-of-00002.safetensors: 96% 231M/241M [00:05<00:00, 46.9MB/s]\u001b[A\u001b[A\n", + "model-00001-of-00002.safetensors: 5% 231M/4.99G [00:05<01:44, 45.5MB/s]\u001b[A\n", "\n", - "Traceback (most recent call last):\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 217, in get_module_paths\n", - " potential_paths = extract_paths(module)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/streamlit/watcher/local_sources_watcher.py\", line 210, in \n", - " lambda m: list(m.__path__._path),\n", - " ^^^^^^^^^^^^^^^^\n", - " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", - " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK loaded successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "2025-05-07 03:43:21.814 Examining the path of torch.classes raised:\n", + "model-00002-of-00002.safetensors: 100% 241M/241M [00:05<00:00, 52.6MB/s]\u001b[A\u001b[A\n", + "model-00002-of-00002.safetensors: 100% 241M/241M [00:05<00:00, 44.7MB/s]\n", + "\n", + "model-00001-of-00002.safetensors: 5% 262M/4.99G [00:05<01:09, 68.1MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 6% 283M/4.99G [00:05<01:04, 73.0MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 6% 294M/4.99G [00:05<01:13, 63.9MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 6% 315M/4.99G [00:06<00:59, 78.7MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 7% 336M/4.99G [00:06<00:50, 91.5MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 7% 357M/4.99G [00:10<06:02, 12.8MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 8% 388M/4.99G [00:10<03:38, 21.1MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 8% 409M/4.99G [00:11<02:43, 28.0MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 9% 430M/4.99G [00:11<02:04, 36.7MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 9% 451M/4.99G [00:11<01:35, 47.4MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 9% 472M/4.99G [00:11<01:16, 59.2MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 10% 493M/4.99G [00:11<01:05, 69.0MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 10% 514M/4.99G [00:11<01:03, 70.9MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 11% 535M/4.99G [00:12<00:53, 83.5MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 11% 556M/4.99G [00:12<00:45, 96.5MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 12% 577M/4.99G [00:12<00:40, 108MB/s] \u001b[A\n", + "model-00001-of-00002.safetensors: 12% 598M/4.99G [00:12<00:36, 120MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 12% 619M/4.99G [00:12<00:34, 128MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 13% 640M/4.99G [00:12<00:34, 128MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 13% 661M/4.99G [00:13<00:45, 94.6MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 14% 682M/4.99G [00:13<00:48, 89.5MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 14% 703M/4.99G [00:13<00:43, 98.6MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 15% 724M/4.99G [00:14<01:02, 67.9MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 15% 744M/4.99G [00:14<00:53, 79.6MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 15% 765M/4.99G [00:14<00:45, 92.9MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 16% 786M/4.99G [00:14<00:40, 104MB/s] \u001b[A\n", + "model-00001-of-00002.safetensors: 16% 807M/4.99G [00:14<00:36, 115MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 17% 828M/4.99G [00:14<00:33, 125MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 17% 849M/4.99G [00:14<00:30, 135MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 17% 870M/4.99G [00:15<00:28, 146MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 18% 891M/4.99G [00:15<00:27, 150MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 18% 912M/4.99G [00:15<00:27, 148MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 19% 933M/4.99G [00:15<00:28, 142MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 19% 954M/4.99G [00:15<00:27, 148MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 20% 986M/4.99G [00:15<00:22, 177MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 20% 1.02G/4.99G [00:15<00:20, 195MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 21% 1.05G/4.99G [00:15<00:18, 210MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 22% 1.08G/4.99G [00:16<00:20, 191MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 22% 1.10G/4.99G [00:16<00:20, 194MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 23% 1.13G/4.99G [00:16<00:18, 213MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 23% 1.16G/4.99G [00:16<00:17, 222MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 24% 1.20G/4.99G [00:16<00:16, 224MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 25% 1.23G/4.99G [00:16<00:15, 238MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 25% 1.26G/4.99G [00:17<00:23, 157MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 26% 1.28G/4.99G [00:20<02:47, 22.1MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 26% 1.30G/4.99G [00:21<02:17, 26.8MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 26% 1.32G/4.99G [00:21<01:46, 34.3MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 27% 1.34G/4.99G [00:21<01:24, 43.2MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 27% 1.36G/4.99G [00:21<01:06, 54.2MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 28% 1.38G/4.99G [00:21<00:54, 65.6MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 28% 1.41G/4.99G [00:21<00:45, 78.1MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 29% 1.43G/4.99G [00:21<00:39, 90.9MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 29% 1.45G/4.99G [00:22<00:35, 100MB/s] \u001b[A\n", + "model-00001-of-00002.safetensors: 29% 1.47G/4.99G [00:22<00:32, 109MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 30% 1.49G/4.99G [00:22<00:29, 117MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 30% 1.51G/4.99G [00:22<00:31, 110MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 31% 1.53G/4.99G [00:22<00:39, 88.0MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 31% 1.55G/4.99G [00:25<02:30, 22.8MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 31% 1.56G/4.99G [00:27<03:29, 16.3MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 32% 1.58G/4.99G [00:27<02:26, 23.3MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 32% 1.60G/4.99G [00:27<01:45, 32.1MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 33% 1.63G/4.99G [00:27<01:18, 43.1MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 33% 1.65G/4.99G [00:27<00:59, 55.9MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 33% 1.67G/4.99G [00:27<00:47, 69.6MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 34% 1.69G/4.99G [00:27<00:39, 84.0MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 34% 1.71G/4.99G [00:27<00:33, 96.7MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 35% 1.73G/4.99G [00:28<00:30, 106MB/s] \u001b[A\n", + "model-00001-of-00002.safetensors: 35% 1.75G/4.99G [00:28<00:28, 114MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 36% 1.77G/4.99G [00:28<00:25, 125MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 36% 1.79G/4.99G [00:28<00:25, 127MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 36% 1.81G/4.99G [00:31<02:14, 23.7MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 37% 1.84G/4.99G [00:31<01:39, 31.7MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 37% 1.86G/4.99G [00:31<01:14, 41.9MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 38% 1.88G/4.99G [00:31<00:56, 54.9MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 38% 1.90G/4.99G [00:31<00:45, 68.0MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 38% 1.92G/4.99G [00:31<00:36, 83.8MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 39% 1.94G/4.99G [00:32<01:00, 50.1MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 39% 1.96G/4.99G [00:32<00:58, 51.5MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 40% 1.98G/4.99G [00:33<00:47, 63.6MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 40% 2.01G/4.99G [00:33<00:33, 88.4MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 41% 2.03G/4.99G [00:33<00:29, 99.5MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 41% 2.06G/4.99G [00:33<00:30, 95.6MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 42% 2.08G/4.99G [00:33<00:34, 83.6MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 42% 2.10G/4.99G [00:34<00:33, 87.3MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 42% 2.12G/4.99G [00:34<00:28, 99.7MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 43% 2.14G/4.99G [00:34<00:25, 110MB/s] \u001b[A\n", + "model-00001-of-00002.safetensors: 43% 2.16G/4.99G [00:34<00:25, 112MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 44% 2.18G/4.99G [00:34<00:28, 98.1MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 44% 2.20G/4.99G [00:35<00:37, 73.9MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 44% 2.21G/4.99G [00:35<00:38, 72.0MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 45% 2.22G/4.99G [00:35<00:38, 72.3MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 45% 2.24G/4.99G [00:35<00:31, 87.8MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 45% 2.26G/4.99G [00:35<00:25, 105MB/s] \u001b[A\n", + "model-00001-of-00002.safetensors: 46% 2.29G/4.99G [00:36<00:21, 124MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 46% 2.31G/4.99G [00:36<00:19, 136MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 47% 2.35G/4.99G [00:36<00:13, 192MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 48% 2.39G/4.99G [00:36<00:11, 229MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 49% 2.42G/4.99G [00:36<00:11, 215MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 49% 2.45G/4.99G [00:36<00:12, 200MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 50% 2.49G/4.99G [00:36<00:11, 224MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 50% 2.52G/4.99G [00:36<00:10, 229MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 51% 2.56G/4.99G [00:37<00:09, 253MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 52% 2.60G/4.99G [00:37<00:08, 277MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 53% 2.63G/4.99G [00:37<00:11, 203MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 53% 2.66G/4.99G [00:37<00:16, 145MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 54% 2.68G/4.99G [00:37<00:15, 154MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 54% 2.72G/4.99G [00:38<00:13, 174MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 55% 2.75G/4.99G [00:38<00:11, 197MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 56% 2.78G/4.99G [00:41<01:14, 29.8MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 56% 2.81G/4.99G [00:41<00:53, 41.0MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 57% 2.83G/4.99G [00:41<00:47, 45.9MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 57% 2.86G/4.99G [00:41<00:33, 63.1MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 58% 2.89G/4.99G [00:41<00:25, 82.4MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 59% 2.93G/4.99G [00:42<00:20, 102MB/s] \u001b[A\n", + "model-00001-of-00002.safetensors: 59% 2.96G/4.99G [00:42<00:16, 121MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 60% 2.99G/4.99G [00:42<00:14, 140MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 61% 3.02G/4.99G [00:42<00:11, 165MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 61% 3.05G/4.99G [00:42<00:10, 187MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 62% 3.08G/4.99G [00:42<00:09, 210MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 62% 3.11G/4.99G [00:42<00:08, 219MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 63% 3.15G/4.99G [00:42<00:08, 219MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 64% 3.18G/4.99G [00:43<00:12, 147MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 64% 3.20G/4.99G [00:48<01:55, 15.5MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 65% 3.22G/4.99G [00:49<01:38, 17.9MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 65% 3.26G/4.99G [00:49<00:59, 29.2MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 66% 3.30G/4.99G [00:49<00:38, 43.9MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 67% 3.33G/4.99G [00:49<00:28, 57.1MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 67% 3.37G/4.99G [00:50<00:22, 72.2MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 68% 3.40G/4.99G [00:50<00:17, 89.6MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 69% 3.43G/4.99G [00:50<00:14, 110MB/s] \u001b[A\n", + "model-00001-of-00002.safetensors: 69% 3.46G/4.99G [00:50<00:11, 130MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 70% 3.49G/4.99G [00:50<00:09, 152MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 71% 3.52G/4.99G [00:50<00:08, 179MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 71% 3.55G/4.99G [00:50<00:07, 203MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 72% 3.60G/4.99G [00:50<00:05, 234MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 73% 3.63G/4.99G [00:51<00:08, 161MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 73% 3.66G/4.99G [00:53<00:33, 39.4MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 74% 3.70G/4.99G [00:53<00:22, 57.2MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 75% 3.73G/4.99G [00:53<00:17, 73.7MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 75% 3.76G/4.99G [00:53<00:13, 93.6MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 76% 3.80G/4.99G [00:55<00:24, 47.9MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 77% 3.83G/4.99G [00:55<00:18, 62.3MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 77% 3.86G/4.99G [00:55<00:13, 81.4MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 78% 3.90G/4.99G [00:55<00:09, 111MB/s] \u001b[A\n", + "model-00001-of-00002.safetensors: 79% 3.93G/4.99G [00:55<00:07, 134MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 79% 3.96G/4.99G [00:55<00:06, 156MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 80% 4.00G/4.99G [00:56<00:09, 100MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 81% 4.02G/4.99G [00:59<00:39, 24.5MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 81% 4.05G/4.99G [00:59<00:27, 34.0MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 82% 4.08G/4.99G [01:00<00:19, 47.0MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 83% 4.12G/4.99G [01:01<00:22, 38.6MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 83% 4.14G/4.99G [01:01<00:18, 46.2MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 84% 4.17G/4.99G [01:01<00:13, 62.5MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 84% 4.20G/4.99G [01:01<00:09, 82.6MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 85% 4.24G/4.99G [01:01<00:07, 106MB/s] \u001b[A\n", + "model-00001-of-00002.safetensors: 86% 4.27G/4.99G [01:01<00:05, 131MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 86% 4.31G/4.99G [01:02<00:04, 168MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 87% 4.34G/4.99G [01:02<00:03, 188MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 88% 4.38G/4.99G [01:02<00:02, 221MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 89% 4.41G/4.99G [01:02<00:02, 232MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 89% 4.45G/4.99G [01:02<00:02, 223MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 90% 4.48G/4.99G [01:02<00:02, 236MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 90% 4.51G/4.99G [01:02<00:01, 242MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 91% 4.55G/4.99G [01:03<00:01, 265MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 92% 4.58G/4.99G [01:03<00:01, 241MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 92% 4.61G/4.99G [01:03<00:01, 247MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 93% 4.65G/4.99G [01:03<00:01, 236MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 94% 4.69G/4.99G [01:03<00:01, 259MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 95% 4.72G/4.99G [01:03<00:01, 257MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 95% 4.75G/4.99G [01:03<00:00, 240MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 96% 4.78G/4.99G [01:03<00:00, 244MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 96% 4.81G/4.99G [01:04<00:00, 248MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 97% 4.85G/4.99G [01:04<00:00, 280MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 98% 4.89G/4.99G [01:04<00:00, 232MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 99% 4.92G/4.99G [01:04<00:00, 219MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 99% 4.95G/4.99G [01:04<00:00, 196MB/s]\u001b[A\n", + "model-00001-of-00002.safetensors: 100% 4.99G/4.99G [01:04<00:00, 76.8MB/s]\n", + "Fetching 2 files: 100% 2/2 [01:05<00:00, 32.58s/it]\n", + "Loading checkpoint shards: 100% 2/2 [00:00<00:00, 12.47it/s]\n", + "generation_config.json: 100% 168/168 [00:00<00:00, 820kB/s]\n", + "tokenizer_config.json: 100% 46.9k/46.9k [00:00<00:00, 23.7MB/s]\n", + "tokenizer.model: 100% 4.24M/4.24M [00:00<00:00, 57.6MB/s]\n", + "tokenizer.json: 100% 17.5M/17.5M [00:00<00:00, 238MB/s]\n", + "special_tokens_map.json: 100% 555/555 [00:00<00:00, 3.18MB/s]\n", + "Device set to use cpu\n", + "2025-05-07 07:34:45.976 Examining the path of torch.classes raised:\n", "Traceback (most recent call last):\n", " File \"/usr/local/lib/python3.11/dist-packages/streamlit/web/bootstrap.py\", line 347, in run\n", " if asyncio.get_running_loop().is_running():\n", @@ -984,41 +880,7 @@ " File \"/usr/local/lib/python3.11/dist-packages/torch/_classes.py\", line 13, in __getattr__\n", " proxy = torch._C._get_custom_class_python_wrapper(self.name, attr)\n", " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "NLTK Punkt data checked/downloaded.\n", - "Database 'chat_feedback.db' initialized successfully.\n", - "\u001b[31m──\u001b[0m\u001b[31m────────────────────────\u001b[0m\u001b[31m \u001b[0m\u001b[1;31mTraceback \u001b[0m\u001b[1;2;31m(most recent call last)\u001b[0m\u001b[31m \u001b[0m\u001b[31m─────────────────────────\u001b[0m\u001b[31m──\u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2;33m/usr/local/lib/python3.11/dist-packages/streamlit/runtime/scriptrunner/\u001b[0m\u001b[1;33mexec_code.py\u001b[0m: \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[94m121\u001b[0m in \u001b[92mexec_func_with_error_handling\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2;33m/usr/local/lib/python3.11/dist-packages/streamlit/runtime/scriptrunner/\u001b[0m\u001b[1;33mscript_runner\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[1;33m.py\u001b[0m:\u001b[94m648\u001b[0m in \u001b[92mcode_to_exec\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2;33m/content/lecture-ai-engineering/day1/02_streamlit_app/\u001b[0m\u001b[1;33mapp.py\u001b[0m:\u001b[94m71\u001b[0m in \u001b[92m\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m68 \u001b[0m\u001b[2m# --- メインコンテンツ ---\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m69 \u001b[0m\u001b[94mif\u001b[0m st.session_state.page == \u001b[33m\"\u001b[0m\u001b[33mチャット\u001b[0m\u001b[33m\"\u001b[0m: \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m70 \u001b[0m\u001b[2m│ \u001b[0m\u001b[94mif\u001b[0m pipe: \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m❱ \u001b[0m71 \u001b[2m│ │ \u001b[0m\u001b[1;4mui.display_chat_page(pipe)\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m72 \u001b[0m\u001b[2m│ \u001b[0m\u001b[94melse\u001b[0m: \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m73 \u001b[0m\u001b[2m│ │ \u001b[0mst.error(\u001b[33m\"\u001b[0m\u001b[33mチャット機能を利用できません。モデルの読み込みに失敗しました \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m74 \u001b[0m\u001b[94melif\u001b[0m st.session_state.page == \u001b[33m\"\u001b[0m\u001b[33m履歴閲覧\u001b[0m\u001b[33m\"\u001b[0m: \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2;33m/content/lecture-ai-engineering/day1/02_streamlit_app/\u001b[0m\u001b[1;33mui.py\u001b[0m:\u001b[94m50\u001b[0m in \u001b[92mdisplay_chat_page\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 47 \u001b[0m\u001b[2m│ │ \u001b[0mst.session_state.feedback_given = \u001b[94mFalse\u001b[0m \u001b[2m# フィードバック状態もリセット\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 48 \u001b[0m\u001b[2m│ │ \u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 49 \u001b[0m\u001b[2m│ │ \u001b[0m\u001b[94mwith\u001b[0m st.spinner(\u001b[33m\"\u001b[0m\u001b[33mモデルが回答を生成中...\u001b[0m\u001b[33m\"\u001b[0m): \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[31m❱ \u001b[0m 50 \u001b[2m│ │ │ \u001b[0m\u001b[1;4manswer, response_time\u001b[0m = generate_response(pipe, user_question) \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 51 \u001b[0m\u001b[2m│ │ │ \u001b[0mst.session_state.current_answer = answer \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 52 \u001b[0m\u001b[2m│ │ │ \u001b[0mst.session_state.response_time = response_time \u001b[31m \u001b[0m\n", - "\u001b[31m \u001b[0m \u001b[2m 53 \u001b[0m\u001b[2m│ │ │ \u001b[0m\u001b[2m# ここでrerunすると回答とフィードバックが一度に表示される\u001b[0m \u001b[31m \u001b[0m\n", - "\u001b[31m────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n", - "\u001b[1;91mTypeError: \u001b[0mcannot unpack non-iterable NoneType object\n" + "RuntimeError: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_\n" ] } ], @@ -1061,7 +923,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": null, "metadata": { "id": "WFJC2TmZELSP" },