Skip to content

Commit 095090d

Browse files
authored
remove upperbound for matplotlib on win where it is possible (openvinotoolkit#2454)
1 parent e594dd3 commit 095090d

File tree

38 files changed

+104
-220
lines changed

38 files changed

+104
-220
lines changed

notebooks/3D-segmentation-point-clouds/3D-segmentation-point-clouds.ipynb

+1-8
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,7 @@
4040
"metadata": {},
4141
"outputs": [],
4242
"source": [
43-
"import platform\n",
44-
"\n",
45-
"%pip install -q \"openvino>=2023.1.0\" \"tqdm\"\n",
46-
"\n",
47-
"if platform.system() != \"Windows\":\n",
48-
" %pip install -q \"matplotlib>=3.4\"\n",
49-
"else:\n",
50-
" %pip install -q \"matplotlib>=3.4,<3.7\""
43+
"%pip install -q \"openvino>=2023.1.0\" \"tqdm\" \"matplotlib>=3.4\""
5144
]
5245
},
5346
{

notebooks/async-api/async-api.ipynb

+1-7
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,8 @@
5555
"metadata": {},
5656
"outputs": [],
5757
"source": [
58-
"import platform\n",
59-
"\n",
6058
"%pip install -q \"openvino>=2023.1.0\"\n",
61-
"%pip install -q opencv-python\n",
62-
"if platform.system() != \"windows\":\n",
63-
" %pip install -q \"matplotlib>=3.4\"\n",
64-
"else:\n",
65-
" %pip install -q \"matplotlib>=3.4,<3.7\""
59+
"%pip install -q opencv-python \"matplotlib>=3.4\""
6660
]
6761
},
6862
{

notebooks/auto-device/auto-device.ipynb

+3-5
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,10 @@
7070
"import platform\n",
7171
"\n",
7272
"# Install required packages\n",
73-
"%pip install -q \"openvino>=2023.1.0\" \"numpy<2\" Pillow torch torchvision tqdm --extra-index-url https://download.pytorch.org/whl/cpu\n",
73+
"%pip install -q \"openvino>=2023.1.0\" \"matplotlib>=3.4\" Pillow torch torchvision tqdm --extra-index-url https://download.pytorch.org/whl/cpu\n",
7474
"\n",
75-
"if platform.system() != \"Windows\":\n",
76-
" %pip install -q \"matplotlib>=3.4\"\n",
77-
"else:\n",
78-
" %pip install -q \"matplotlib>=3.4,<3.7\""
75+
"if platform.system() == \"Darwin\":\n",
76+
" %pip install -q \"numpy<2.0.0\""
7977
]
8078
},
8179
{

notebooks/clip-zero-shot-image-classification/clip-zero-shot-classification.ipynb

+1-8
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,7 @@
8888
"metadata": {},
8989
"outputs": [],
9090
"source": [
91-
"import platform\n",
92-
"\n",
93-
"%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu \"gradio>=4.19\" \"openvino>=2023.1.0\" \"transformers[torch]>=4.30\" \"datasets\" \"nncf>=2.6.0\" \"torch>=2.1\" Pillow\n",
94-
"\n",
95-
"if platform.system() != \"Windows\":\n",
96-
" %pip install -q \"matplotlib>=3.4\"\n",
97-
"else:\n",
98-
" %pip install -q \"matplotlib>=3.4,<3.7\"\n",
91+
"%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu \"gradio>=4.19\" \"matplotlib>=3.4\" \"openvino>=2023.1.0\" \"transformers[torch]>=4.30\" \"datasets\" \"nncf>=2.6.0\" \"torch>=2.1\" Pillow\n",
9992
"\n",
10093
"import requests\n",
10194
"\n",

notebooks/controlnet-stable-diffusion/controlnet-stable-diffusion.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"outputs": [],
119119
"source": [
120120
"%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu \"torch>=2.1\" \"torchvision\"\n",
121-
"%pip install -q \"diffusers>=0.14.0\" \"transformers>=4.30.2\" \"controlnet-aux>=0.0.6\" \"gradio>=3.36\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
121+
"%pip install -q \"diffusers>=0.14.0\" \"matplotlib>=3.4\" \"transformers>=4.30.2\" \"controlnet-aux>=0.0.6\" \"gradio>=3.36\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
122122
"%pip install -q \"openvino>=2023.1.0\" \"datasets>=2.14.6\" \"nncf>=2.7.0\"\n",
123123
"\n",
124124
"import requests\n",

notebooks/convert-to-openvino/convert-to-openvino.ipynb

+22-29
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@
4343
"outputs": [],
4444
"source": [
4545
"# Required imports. Please execute this cell first.\n",
46-
"%pip install --upgrade pip\n",
4746
"%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu \\\n",
48-
"\"openvino-dev>=2024.0.0\" \"requests\" \"tqdm\" \"transformers>=4.31\" \"onnx<1.16.2\" \"torch>=2.1\" \"torchvision\" \"tensorflow_hub\" \"tensorflow\""
47+
"\"openvino>=2024.4.0\" \"requests\" \"tqdm\" \"transformers>=4.31\" \"onnx!=1.16.2\" \"torch>=2.1\" \"torchvision\" \"tensorflow_hub\" \"tensorflow\""
4948
]
5049
},
5150
{
@@ -617,26 +616,16 @@
617616
]
618617
},
619618
{
620-
"cell_type": "code",
621-
"execution_count": 20,
619+
"attachments": {},
620+
"cell_type": "markdown",
622621
"metadata": {},
623-
"outputs": [
624-
{
625-
"name": "stderr",
626-
"output_type": "stream",
627-
"text": [
628-
"huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...\n",
629-
"To disable this warning, you can either:\n",
630-
"\t- Avoid using `tokenizers` before the fork if possible\n",
631-
"\t- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)\n"
632-
]
633-
}
634-
],
635622
"source": [
623+
"```python\n",
636624
"# Legacy Model Optimizer API\n",
637625
"from openvino.tools import mo\n",
638626
"\n",
639-
"ov_model = mo.convert_model(ONNX_CV_MODEL_PATH, layout=\"nchw\")"
627+
"ov_model = mo.convert_model(ONNX_CV_MODEL_PATH, layout=\"nchw\")\n",
628+
"```"
640629
]
641630
},
642631
{
@@ -670,18 +659,19 @@
670659
]
671660
},
672661
{
673-
"cell_type": "code",
674-
"execution_count": 22,
662+
"attachments": {},
663+
"cell_type": "markdown",
675664
"metadata": {},
676-
"outputs": [],
677665
"source": [
678666
"# Legacy Model Optimizer API\n",
667+
"```python\n",
679668
"from openvino.tools import mo\n",
680669
"\n",
681670
"ov_model = mo.convert_model(ONNX_CV_MODEL_PATH, layout=\"nchw->nhwc\")\n",
682671
"\n",
683672
"# alternatively use source_layout and target_layout parameters\n",
684-
"ov_model = mo.convert_model(ONNX_CV_MODEL_PATH, source_layout=\"nchw\", target_layout=\"nhwc\")"
673+
"ov_model = mo.convert_model(ONNX_CV_MODEL_PATH, source_layout=\"nchw\", target_layout=\"nhwc\")\n",
674+
"```"
685675
]
686676
},
687677
{
@@ -715,20 +705,22 @@
715705
]
716706
},
717707
{
718-
"cell_type": "code",
719-
"execution_count": 24,
708+
"attachments": {},
709+
"cell_type": "markdown",
720710
"metadata": {},
721-
"outputs": [],
722711
"source": [
712+
"```python\n",
723713
"# Legacy Model Optimizer API\n",
714+
"\n",
724715
"from openvino.tools import mo\n",
725716
"\n",
726717
"\n",
727718
"ov_model = mo.convert_model(\n",
728719
" ONNX_CV_MODEL_PATH,\n",
729720
" mean_values=[255 * x for x in [0.485, 0.456, 0.406]],\n",
730721
" scale_values=[255 * x for x in [0.229, 0.224, 0.225]],\n",
731-
")"
722+
")\n",
723+
"```"
732724
]
733725
},
734726
{
@@ -760,15 +752,16 @@
760752
]
761753
},
762754
{
763-
"cell_type": "code",
764-
"execution_count": 26,
755+
"attachments": {},
756+
"cell_type": "markdown",
765757
"metadata": {},
766-
"outputs": [],
767758
"source": [
759+
"```python\n",
768760
"# Legacy Model Optimizer API\n",
769761
"from openvino.tools import mo\n",
770762
"\n",
771-
"ov_model = mo.convert_model(ONNX_CV_MODEL_PATH, reverse_input_channels=True)"
763+
"ov_model = mo.convert_model(ONNX_CV_MODEL_PATH, reverse_input_channels=True)\n",
764+
"```"
772765
]
773766
},
774767
{

notebooks/cross-lingual-books-alignment/cross-lingual-books-alignment.ipynb

+1-8
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,7 @@
6161
"metadata": {},
6262
"outputs": [],
6363
"source": [
64-
"import platform\n",
65-
"\n",
66-
"if platform.system() != \"Windows\":\n",
67-
" %pip install -q \"matplotlib>=3.4\"\n",
68-
"else:\n",
69-
" %pip install -q \"matplotlib>=3.4,<3.7\"\n",
70-
"\n",
71-
"%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu requests pysbd transformers \"torch>=2.1\" \"openvino>=2023.1.0\" seaborn ipywidgets"
64+
"%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu requests pysbd transformers \"torch>=2.1\" \"openvino>=2023.1.0\" seaborn ipywidgets \"matplotlib>=3.4\""
7265
]
7366
},
7467
{

0 commit comments

Comments
 (0)