Skip to content

Commit 985420f

Browse files
authored
fix errors reported by nightly (#1818)
1 parent 42d80f8 commit 985420f

File tree

4 files changed

+30
-198
lines changed

4 files changed

+30
-198
lines changed

notebooks/122-quantizing-model-with-accuracy-control/122-yolov8-quantization-with-accuracy-control.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,8 +644,8 @@
644644
"ov_config = {}\n",
645645
"if \"GPU\" in device.value or (\"AUTO\" in device.value and \"GPU\" in core.available_devices):\n",
646646
" ov_config = {\"GPU_DISABLE_WINOGRAD_CONVOLUTION\": \"YES\"}\n",
647-
"quantized_compiled_model = core.compile_model(model=quantized_model, device_name=device.value, ov_config)\n",
648-
"compiled_ov_model = core.compile_model(model=ov_model, device_name=device.value, ov_config)\n",
647+
"quantized_compiled_model = core.compile_model(model=quantized_model, device.value, ov_config)\n",
648+
"compiled_ov_model = core.compile_model(model=ov_model, device.value, ov_config)\n",
649649
"\n",
650650
"pt_result = validation_ac(compiled_ov_model, data_loader, validator)\n",
651651
"quantized_result = validation_ac(quantized_compiled_model, data_loader, validator)\n",

notebooks/259-decidiffusion-image-generation/259-decidiffusion-image-generation.ipynb

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cells": [
33
{
4+
"attachments": {},
45
"cell_type": "markdown",
56
"id": "d59799fb-ee4c-4601-acb1-05c653331a96",
67
"metadata": {},
@@ -49,6 +50,7 @@
4950
]
5051
},
5152
{
53+
"attachments": {},
5254
"cell_type": "markdown",
5355
"id": "13c7efe9-5dbd-4904-be80-27ec6d0ec27b",
5456
"metadata": {},
@@ -66,10 +68,11 @@
6668
"metadata": {},
6769
"outputs": [],
6870
"source": [
69-
"%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\""
71+
"%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\""
7072
]
7173
},
7274
{
75+
"attachments": {},
7376
"cell_type": "markdown",
7477
"id": "e209ffee-bae8-48f0-8666-7d75d49ba4c9",
7578
"metadata": {},
@@ -163,6 +166,7 @@
163166
]
164167
},
165168
{
169+
"attachments": {},
166170
"cell_type": "markdown",
167171
"id": "ace6a515-3de6-414d-a15a-b5c845e009fa",
168172
"metadata": {},
@@ -239,6 +243,7 @@
239243
]
240244
},
241245
{
246+
"attachments": {},
242247
"cell_type": "markdown",
243248
"id": "5badfb50-1349-44c1-bae7-e48e322d23a4",
244249
"metadata": {},
@@ -321,6 +326,7 @@
321326
]
322327
},
323328
{
329+
"attachments": {},
324330
"cell_type": "markdown",
325331
"id": "91ea70c1-3b81-40a1-96b0-18e1d8833ef4",
326332
"metadata": {},
@@ -429,6 +435,7 @@
429435
]
430436
},
431437
{
438+
"attachments": {},
432439
"cell_type": "markdown",
433440
"id": "e52fa562-f5fb-4c5e-b6a0-a9707b547a7e",
434441
"metadata": {},
@@ -834,6 +841,7 @@
834841
]
835842
},
836843
{
844+
"attachments": {},
837845
"cell_type": "markdown",
838846
"id": "a57236f8-990c-4500-bd79-53429ac7ec4c",
839847
"metadata": {},
@@ -853,6 +861,7 @@
853861
]
854862
},
855863
{
864+
"attachments": {},
856865
"cell_type": "markdown",
857866
"id": "53d8d1e8-d4c6-42bc-9d76-48b728574279",
858867
"metadata": {},
@@ -913,6 +922,7 @@
913922
]
914923
},
915924
{
925+
"attachments": {},
916926
"cell_type": "markdown",
917927
"id": "8971d327-1925-4996-93bc-b68a247c557d",
918928
"metadata": {},
@@ -953,6 +963,7 @@
953963
]
954964
},
955965
{
966+
"attachments": {},
956967
"cell_type": "markdown",
957968
"id": "572420e2-261a-493b-930f-72bf646c0021",
958969
"metadata": {},
@@ -1058,6 +1069,7 @@
10581069
]
10591070
},
10601071
{
1072+
"attachments": {},
10611073
"cell_type": "markdown",
10621074
"id": "f3d0aa91-2739-4401-ab63-c21c5a027058",
10631075
"metadata": {},
@@ -1176,6 +1188,7 @@
11761188
]
11771189
},
11781190
{
1191+
"attachments": {},
11791192
"cell_type": "markdown",
11801193
"id": "0075bf16",
11811194
"metadata": {},
@@ -1229,6 +1242,7 @@
12291242
]
12301243
},
12311244
{
1245+
"attachments": {},
12321246
"cell_type": "markdown",
12331247
"id": "5fcf00ec",
12341248
"metadata": {},
@@ -1252,6 +1266,7 @@
12521266
]
12531267
},
12541268
{
1269+
"attachments": {},
12551270
"cell_type": "markdown",
12561271
"id": "620932bc",
12571272
"metadata": {},
@@ -1342,6 +1357,7 @@
13421357
]
13431358
},
13441359
{
1360+
"attachments": {},
13451361
"cell_type": "markdown",
13461362
"id": "37bf3d8f",
13471363
"metadata": {},
@@ -1412,6 +1428,7 @@
14121428
]
14131429
},
14141430
{
1431+
"attachments": {},
14151432
"cell_type": "markdown",
14161433
"id": "068a5117",
14171434
"metadata": {},
@@ -1463,6 +1480,7 @@
14631480
]
14641481
},
14651482
{
1483+
"attachments": {},
14661484
"cell_type": "markdown",
14671485
"id": "1d8ddf6f",
14681486
"metadata": {},
@@ -1524,6 +1542,7 @@
15241542
]
15251543
},
15261544
{
1545+
"attachments": {},
15271546
"cell_type": "markdown",
15281547
"id": "af613aef",
15291548
"metadata": {},
@@ -1585,6 +1604,7 @@
15851604
]
15861605
},
15871606
{
1607+
"attachments": {},
15881608
"cell_type": "markdown",
15891609
"id": "150316f0",
15901610
"metadata": {},
@@ -1654,6 +1674,7 @@
16541674
]
16551675
},
16561676
{
1677+
"attachments": {},
16571678
"cell_type": "markdown",
16581679
"id": "0a82b780",
16591680
"metadata": {},
@@ -1690,6 +1711,7 @@
16901711
]
16911712
},
16921713
{
1714+
"attachments": {},
16931715
"cell_type": "markdown",
16941716
"id": "d3a27c6e-c16d-40ab-b6ea-68f3d8d95d80",
16951717
"metadata": {},

notebooks/273-stable-zephyr-3b-chatbot/273-stable-zephyr-3b-chatbot.ipynb

Lines changed: 4 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
"\n",
147147
"convert_script = genai_llm_bench / \"convert.py\"\n",
148148
"\n",
149-
"if not (stateful_model_path / \"openvino_model.xml\").exists()\n",
149+
"if not (stateful_model_path / \"openvino_model.xml\").exists():\n",
150150
" !python $convert_script --model_id stabilityai/stable-zephyr-3b --precision FP16 --compress_weights 4BIT_DEFAULT --output stable-zephyr-3b-stateful --force_convert"
151151
]
152152
},
@@ -481,44 +481,10 @@
481481
},
482482
{
483483
"cell_type": "code",
484-
"execution_count": 9,
484+
"execution_count": null,
485485
"id": "b7f014a4-2b3b-41fc-aae1-b4b0729b978d",
486486
"metadata": {},
487-
"outputs": [
488-
{
489-
"name": "stderr",
490-
"output_type": "stream",
491-
"text": [
492-
"Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n",
493-
"/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",
494-
" warnings.warn(value)\n",
495-
"/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",
496-
" warnings.warn(\n"
497-
]
498-
},
499-
{
500-
"name": "stdout",
501-
"output_type": "stream",
502-
"text": [
503-
"Running on local URL: http://127.0.0.1:7860\n"
504-
]
505-
},
506-
{
507-
"ename": "KeyboardInterrupt",
508-
"evalue": "",
509-
"output_type": "error",
510-
"traceback": [
511-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
512-
"\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
513-
"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",
514-
"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",
515-
"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",
516-
"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",
517-
"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",
518-
"\u001b[0;31mKeyboardInterrupt\u001b[0m: "
519-
]
520-
}
521-
],
487+
"outputs": [],
522488
"source": [
523489
"import torch\n",
524490
"from threading import Event, Thread\n",
@@ -884,38 +850,7 @@
884850
},
885851
"widgets": {
886852
"application/vnd.jupyter.widget-state+json": {
887-
"state": {
888-
"75f7bc21fe684e019f27736a7cf80f58": {
889-
"model_module": "@jupyter-widgets/base",
890-
"model_module_version": "2.0.0",
891-
"model_name": "LayoutModel",
892-
"state": {}
893-
},
894-
"86abb36a40914433bfdde6cdb044cab9": {
895-
"model_module": "@jupyter-widgets/controls",
896-
"model_module_version": "2.0.0",
897-
"model_name": "DescriptionStyleModel",
898-
"state": {
899-
"description_width": ""
900-
}
901-
},
902-
"bd380d7c5b044d02a29085bb584067e5": {
903-
"model_module": "@jupyter-widgets/controls",
904-
"model_module_version": "2.0.0",
905-
"model_name": "DropdownModel",
906-
"state": {
907-
"_options_labels": [
908-
"CPU",
909-
"GPU.0",
910-
"GPU.1"
911-
],
912-
"description": "Device:",
913-
"index": 0,
914-
"layout": "IPY_MODEL_75f7bc21fe684e019f27736a7cf80f58",
915-
"style": "IPY_MODEL_86abb36a40914433bfdde6cdb044cab9"
916-
}
917-
}
918-
},
853+
"state": {},
919854
"version_major": 2,
920855
"version_minor": 0
921856
}

0 commit comments

Comments
 (0)