Skip to content

Commit

Permalink
fix errors reported by nightly (#1818)
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova authored Mar 13, 2024
1 parent 42d80f8 commit 985420f
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 198 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,8 @@
"ov_config = {}\n",
"if \"GPU\" in device.value or (\"AUTO\" in device.value and \"GPU\" in core.available_devices):\n",
" ov_config = {\"GPU_DISABLE_WINOGRAD_CONVOLUTION\": \"YES\"}\n",
"quantized_compiled_model = core.compile_model(model=quantized_model, device_name=device.value, ov_config)\n",
"compiled_ov_model = core.compile_model(model=ov_model, device_name=device.value, ov_config)\n",
"quantized_compiled_model = core.compile_model(model=quantized_model, device.value, ov_config)\n",
"compiled_ov_model = core.compile_model(model=ov_model, device.value, ov_config)\n",
"\n",
"pt_result = validation_ac(compiled_ov_model, data_loader, validator)\n",
"quantized_result = validation_ac(quantized_compiled_model, data_loader, validator)\n",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "d59799fb-ee4c-4601-acb1-05c653331a96",
"metadata": {},
Expand Down Expand Up @@ -49,6 +50,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "13c7efe9-5dbd-4904-be80-27ec6d0ec27b",
"metadata": {},
Expand All @@ -66,10 +68,11 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu \"diffusers\" \"transformers\" \"torch\" \"pillow\" \"openvino>=2023.1.0\" \"gradio\" \"datasets\" \"nncf>=2.7.0\" \"peft==0.6.2\""
"%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu \"diffusers\" \"transformers\" \"torch\" \"pillow\" \"openvino>=2023.1.0\" \"gradio\" \"datasets>=2.14.6\" \"huggingface-hub>=0.19.4\" \"nncf>=2.7.0\" \"peft==0.6.2\""
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "e209ffee-bae8-48f0-8666-7d75d49ba4c9",
"metadata": {},
Expand Down Expand Up @@ -163,6 +166,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "ace6a515-3de6-414d-a15a-b5c845e009fa",
"metadata": {},
Expand Down Expand Up @@ -239,6 +243,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "5badfb50-1349-44c1-bae7-e48e322d23a4",
"metadata": {},
Expand Down Expand Up @@ -321,6 +326,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "91ea70c1-3b81-40a1-96b0-18e1d8833ef4",
"metadata": {},
Expand Down Expand Up @@ -429,6 +435,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "e52fa562-f5fb-4c5e-b6a0-a9707b547a7e",
"metadata": {},
Expand Down Expand Up @@ -834,6 +841,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "a57236f8-990c-4500-bd79-53429ac7ec4c",
"metadata": {},
Expand All @@ -853,6 +861,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "53d8d1e8-d4c6-42bc-9d76-48b728574279",
"metadata": {},
Expand Down Expand Up @@ -913,6 +922,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "8971d327-1925-4996-93bc-b68a247c557d",
"metadata": {},
Expand Down Expand Up @@ -953,6 +963,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "572420e2-261a-493b-930f-72bf646c0021",
"metadata": {},
Expand Down Expand Up @@ -1058,6 +1069,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "f3d0aa91-2739-4401-ab63-c21c5a027058",
"metadata": {},
Expand Down Expand Up @@ -1176,6 +1188,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "0075bf16",
"metadata": {},
Expand Down Expand Up @@ -1229,6 +1242,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "5fcf00ec",
"metadata": {},
Expand All @@ -1252,6 +1266,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "620932bc",
"metadata": {},
Expand Down Expand Up @@ -1342,6 +1357,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "37bf3d8f",
"metadata": {},
Expand Down Expand Up @@ -1412,6 +1428,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "068a5117",
"metadata": {},
Expand Down Expand Up @@ -1463,6 +1480,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "1d8ddf6f",
"metadata": {},
Expand Down Expand Up @@ -1524,6 +1542,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "af613aef",
"metadata": {},
Expand Down Expand Up @@ -1585,6 +1604,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "150316f0",
"metadata": {},
Expand Down Expand Up @@ -1654,6 +1674,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "0a82b780",
"metadata": {},
Expand Down Expand Up @@ -1690,6 +1711,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "d3a27c6e-c16d-40ab-b6ea-68f3d8d95d80",
"metadata": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
"\n",
"convert_script = genai_llm_bench / \"convert.py\"\n",
"\n",
"if not (stateful_model_path / \"openvino_model.xml\").exists()\n",
"if not (stateful_model_path / \"openvino_model.xml\").exists():\n",
" !python $convert_script --model_id stabilityai/stable-zephyr-3b --precision FP16 --compress_weights 4BIT_DEFAULT --output stable-zephyr-3b-stateful --force_convert"
]
},
Expand Down Expand Up @@ -481,44 +481,10 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"id": "b7f014a4-2b3b-41fc-aae1-b4b0729b978d",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n",
"/home/ea/work/my_optimum_intel/optimum_env/lib/python3.8/site-packages/gradio/deprecation.py:40: UserWarning: `height` is deprecated in `Interface()`, please use it within `launch()` instead.\n",
" warnings.warn(value)\n",
"/home/ea/work/my_optimum_intel/optimum_env/lib/python3.8/site-packages/gradio/deprecation.py:43: UserWarning: You have unused kwarg parameters in Textbox, please remove them: {'container': False}\n",
" warnings.warn(\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Running on local URL: http://127.0.0.1:7860\n"
]
},
{
"ename": "KeyboardInterrupt",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[9], line 326\u001b[0m\n\u001b[1;32m 320\u001b[0m demo\u001b[38;5;241m.\u001b[39mqueue(max_size\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m2\u001b[39m)\n\u001b[1;32m 321\u001b[0m \u001b[38;5;66;03m# if you are launching remotely, specify server_name and server_port\u001b[39;00m\n\u001b[1;32m 322\u001b[0m \u001b[38;5;66;03m# demo.launch(server_name='your server name', server_port='server port in int')\u001b[39;00m\n\u001b[1;32m 323\u001b[0m \u001b[38;5;66;03m# if you have any issue to launch on your platform, you can pass share=True to launch method:\u001b[39;00m\n\u001b[1;32m 324\u001b[0m \u001b[38;5;66;03m# demo.launch(share=True)\u001b[39;00m\n\u001b[1;32m 325\u001b[0m \u001b[38;5;66;03m# it creates a publicly shareable link for the interface. Read more in the docs: https://gradio.app/docs/\u001b[39;00m\n\u001b[0;32m--> 326\u001b[0m \u001b[43mdemo\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mlaunch\u001b[49m\u001b[43m(\u001b[49m\u001b[43mshare\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n",
"File \u001b[0;32m~/work/my_optimum_intel/optimum_env/lib/python3.8/site-packages/gradio/blocks.py:1542\u001b[0m, in \u001b[0;36mBlocks.launch\u001b[0;34m(self, inline, inbrowser, share, debug, enable_queue, max_threads, auth, auth_message, prevent_thread_lock, show_error, server_name, server_port, show_tips, height, width, encrypt, favicon_path, ssl_keyfile, ssl_certfile, ssl_keyfile_password, quiet, show_api, file_directories, _frontend)\u001b[0m\n\u001b[1;32m 1540\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m 1541\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mshare_url \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[0;32m-> 1542\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mshare_url \u001b[38;5;241m=\u001b[39m \u001b[43mnetworking\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msetup_tunnel\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1543\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mserver_name\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mserver_port\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mshare_token\u001b[49m\n\u001b[1;32m 1544\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1545\u001b[0m \u001b[38;5;28mprint\u001b[39m(strings\u001b[38;5;241m.\u001b[39men[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mSHARE_LINK_DISPLAY\u001b[39m\u001b[38;5;124m\"\u001b[39m]\u001b[38;5;241m.\u001b[39mformat(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mshare_url))\n\u001b[1;32m 1546\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (quiet):\n",
"File \u001b[0;32m~/work/my_optimum_intel/optimum_env/lib/python3.8/site-packages/gradio/networking.py:168\u001b[0m, in \u001b[0;36msetup_tunnel\u001b[0;34m(local_host, local_port, share_token)\u001b[0m\n\u001b[1;32m 164\u001b[0m remote_host, remote_port \u001b[38;5;241m=\u001b[39m payload[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhost\u001b[39m\u001b[38;5;124m\"\u001b[39m], \u001b[38;5;28mint\u001b[39m(payload[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mport\u001b[39m\u001b[38;5;124m\"\u001b[39m])\n\u001b[1;32m 165\u001b[0m tunnel \u001b[38;5;241m=\u001b[39m Tunnel(\n\u001b[1;32m 166\u001b[0m remote_host, remote_port, local_host, local_port, share_token\n\u001b[1;32m 167\u001b[0m )\n\u001b[0;32m--> 168\u001b[0m address \u001b[38;5;241m=\u001b[39m \u001b[43mtunnel\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstart_tunnel\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 169\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m address\n\u001b[1;32m 170\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n",
"File \u001b[0;32m~/work/my_optimum_intel/optimum_env/lib/python3.8/site-packages/gradio/tunneling.py:61\u001b[0m, in \u001b[0;36mTunnel.start_tunnel\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 59\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mstart_tunnel\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[38;5;28mstr\u001b[39m:\n\u001b[1;32m 60\u001b[0m binary_path \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdownload_binary()\n\u001b[0;32m---> 61\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39murl \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_start_tunnel\u001b[49m\u001b[43m(\u001b[49m\u001b[43mbinary_path\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 62\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39murl\n",
"File \u001b[0;32m~/work/my_optimum_intel/optimum_env/lib/python3.8/site-packages/gradio/tunneling.py:97\u001b[0m, in \u001b[0;36mTunnel._start_tunnel\u001b[0;34m(self, binary)\u001b[0m\n\u001b[1;32m 95\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mproc\u001b[38;5;241m.\u001b[39mstdout \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 96\u001b[0m \u001b[38;5;28;01mcontinue\u001b[39;00m\n\u001b[0;32m---> 97\u001b[0m line \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mproc\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstdout\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mreadline\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 98\u001b[0m line \u001b[38;5;241m=\u001b[39m line\u001b[38;5;241m.\u001b[39mdecode(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mutf-8\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 99\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mstart proxy success\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01min\u001b[39;00m line:\n",
"\u001b[0;31mKeyboardInterrupt\u001b[0m: "
]
}
],
"outputs": [],
"source": [
"import torch\n",
"from threading import Event, Thread\n",
Expand Down Expand Up @@ -884,38 +850,7 @@
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {
"75f7bc21fe684e019f27736a7cf80f58": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {}
},
"86abb36a40914433bfdde6cdb044cab9": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "DescriptionStyleModel",
"state": {
"description_width": ""
}
},
"bd380d7c5b044d02a29085bb584067e5": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "DropdownModel",
"state": {
"_options_labels": [
"CPU",
"GPU.0",
"GPU.1"
],
"description": "Device:",
"index": 0,
"layout": "IPY_MODEL_75f7bc21fe684e019f27736a7cf80f58",
"style": "IPY_MODEL_86abb36a40914433bfdde6cdb044cab9"
}
}
},
"state": {},
"version_major": 2,
"version_minor": 0
}
Expand Down
Loading

0 comments on commit 985420f

Please sign in to comment.