Commit 99b3c77a authored by janithGamage's avatar janithGamage

fix: update

parent 15ef1c04
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.10.9" "version": "3.7.16"
} }
}, },
"nbformat": 4, "nbformat": 4,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"cells": [ "cells": [
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 27, "execution_count": 39,
"id": "3d735e52", "id": "3d735e52",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"Requirement already satisfied: fastapi in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (0.95.2)\n", "Requirement already satisfied: fastapi in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (0.95.2)\n",
"Requirement already satisfied: starlette<0.28.0,>=0.27.0 in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (from fastapi) (0.27.0)\n",
"Requirement already satisfied: pydantic!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0,>=1.6.2 in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (from fastapi) (1.10.8)\n", "Requirement already satisfied: pydantic!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0,>=1.6.2 in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (from fastapi) (1.10.8)\n",
"Requirement already satisfied: starlette<0.28.0,>=0.27.0 in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (from fastapi) (0.27.0)\n",
"Requirement already satisfied: typing-extensions>=4.2.0 in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (from pydantic!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0,>=1.6.2->fastapi) (4.3.0)\n", "Requirement already satisfied: typing-extensions>=4.2.0 in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (from pydantic!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0,>=1.6.2->fastapi) (4.3.0)\n",
"Requirement already satisfied: anyio<5,>=3.4.0 in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (from starlette<0.28.0,>=0.27.0->fastapi) (3.5.0)\n", "Requirement already satisfied: anyio<5,>=3.4.0 in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (from starlette<0.28.0,>=0.27.0->fastapi) (3.5.0)\n",
"Requirement already satisfied: sniffio>=1.1 in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (from anyio<5,>=3.4.0->starlette<0.28.0,>=0.27.0->fastapi) (1.2.0)\n", "Requirement already satisfied: sniffio>=1.1 in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (from anyio<5,>=3.4.0->starlette<0.28.0,>=0.27.0->fastapi) (1.2.0)\n",
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 28, "execution_count": 40,
"id": "8f281d93", "id": "8f281d93",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 29, "execution_count": 41,
"id": "97a4a52c", "id": "97a4a52c",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 30, "execution_count": 42,
"id": "540c9e2f", "id": "540c9e2f",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 31, "execution_count": 43,
"id": "db756418", "id": "db756418",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 32, "execution_count": 44,
"id": "fc83d1b8", "id": "fc83d1b8",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 33, "execution_count": 45,
"id": "63dbfc01", "id": "63dbfc01",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 34, "execution_count": 46,
"id": "f7e5cdba", "id": "f7e5cdba",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 35, "execution_count": 47,
"id": "d86a9515", "id": "d86a9515",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
")" ")"
] ]
}, },
"execution_count": 35, "execution_count": 47,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 36, "execution_count": 48,
"id": "4b527135", "id": "4b527135",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 37, "execution_count": 49,
"id": "df08611e", "id": "df08611e",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 38, "execution_count": 50,
"id": "84b9601b", "id": "84b9601b",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
...@@ -254,18 +254,24 @@ ...@@ -254,18 +254,24 @@
"INFO: Started server process [29948]\n", "INFO: Started server process [29948]\n",
"INFO: Waiting for application startup.\n", "INFO: Waiting for application startup.\n",
"INFO: Application startup complete.\n", "INFO: Application startup complete.\n",
"INFO: Uvicorn running on http://127.0.0.1:8001 (Press CTRL+C to quit)\n" "INFO: Uvicorn running on http://127.0.0.1:8001 (Press CTRL+C to quit)\n",
"INFO: Shutting down\n",
"INFO: Waiting for application shutdown.\n",
"INFO: Application shutdown complete.\n",
"INFO: Finished server process [29948]\n"
] ]
}, },
{ {
"name": "stdout", "ename": "TypeError",
"output_type": "stream", "evalue": "a coroutine was expected, got None",
"text": [ "output_type": "error",
"tensor([[2.0707e-08, 1.3095e-06, 4.2269e-09, 3.1405e-08, 7.0333e-13, 1.3519e-07,\n", "traceback": [
" 2.7351e-16, 9.9999e-01, 7.2929e-18, 5.1420e-11, 3.3166e-06, 1.7149e-09,\n", "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
" 4.6723e-10, 5.4727e-07, 3.0778e-10, 3.3862e-13]],\n", "\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)",
" grad_fn=<SoftmaxBackward0>)\n", "\u001b[1;32m~\\AppData\\Local\\Temp\\ipykernel_29948\\822276065.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0m__name__\u001b[0m \u001b[1;33m==\u001b[0m \u001b[1;34m\"__main__\"\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[0mloop\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0masyncio\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_event_loop\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mloop\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcreate_task\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0muvicorn\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrun\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mapp\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mhost\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m\"127.0.0.1\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mport\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m8001\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4\u001b[0m \u001b[0mloop\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrun_forever\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"INFO: 127.0.0.1:52609 - \"POST /predict-similarity HTTP/1.1\" 200 OK\n" "\u001b[1;32mc:\\Users\\JanithGamage\\.conda\\envs\\Test\\lib\\asyncio\\base_events.py\u001b[0m in \u001b[0;36mcreate_task\u001b[1;34m(self, coro)\u001b[0m\n\u001b[0;32m 402\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_check_closed\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 403\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_task_factory\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 404\u001b[1;33m \u001b[0mtask\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mtasks\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mTask\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mcoro\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mloop\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 405\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mtask\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_source_traceback\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 406\u001b[0m \u001b[1;32mdel\u001b[0m \u001b[0mtask\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_source_traceback\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m-\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32mc:\\Users\\JanithGamage\\.conda\\envs\\Test\\lib\\asyncio\\tasks.py\u001b[0m in \u001b[0;36m__init__\u001b[1;34m(self, coro, loop)\u001b[0m\n\u001b[0;32m 133\u001b[0m \u001b[1;31m# prevent logging for pending task in __del__\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 134\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_log_destroy_pending\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mFalse\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 135\u001b[1;33m \u001b[1;32mraise\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34mf\"a coroutine was expected, got {coro!r}\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 136\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 137\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_must_cancel\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mFalse\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mTypeError\u001b[0m: a coroutine was expected, got None"
] ]
} }
], ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment