Skip to content

Commit 1bc5c7b

Browse files
Fix checkers and test-replace (#2844)
1 parent 34eae2b commit 1bc5c7b

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

notebooks/grammar-correction/grammar-correction.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@
981981
" quantized_model_path,\n",
982982
" device.value,\n",
983983
" calibration_dataset_size=CALIBRATION_DATASET_SIZE,\n",
984-
" additional_args=additional_args\n",
984+
" additional_args=additional_args,\n",
985985
" )"
986986
]
987987
},

notebooks/magika-content-type-recognition/magika-content-type-recognition.ipynb

+2-3
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
"\n",
107107
"from magika import Magika\n",
108108
"from magika.types import ModelFeatures, ModelOutput, MagikaResult\n",
109+
"\n",
109110
"try:\n",
110111
" from magika.types.prediction_mode import PredictionMode\n",
111112
"except ImportError:\n",
@@ -182,9 +183,7 @@
182183
" batches_num += 1\n",
183184
"\n",
184185
" for batch_idx in range(batches_num):\n",
185-
" self._log.debug(\n",
186-
" f\"Getting raw predictions for (internal) batch {batch_idx+1}/{batches_num}\"\n",
187-
" )\n",
186+
" self._log.debug(f\"Getting raw predictions for (internal) batch {batch_idx+1}/{batches_num}\")\n",
188187
" start_idx = batch_idx * max_internal_batch_size\n",
189188
" end_idx = min((batch_idx + 1) * max_internal_batch_size, samples_num)\n",
190189
" batch_raw_predictions = self._onnx_session({\"bytes\": X[start_idx:end_idx, :]})[\"target_label\"]\n",

notebooks/sound-generation-audioldm2/sound-generation-audioldm2.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"%pip install -qU accelerate \"diffusers>=0.30.0\" \"transformers>=4.43\" \"torch>=2.1\" \"gradio>=4.19\" \"peft>=0.6.2\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
6868
"%pip install -q \"openvino>=2024.0.0\"\n",
6969
"\n",
70-
"if platform.system() == \"Darwin\" and platform.processor() != \"arm\":\n",
70+
"if platform.system() == \"Darwin\" and platform.processor() != \"arm\":\n",
7171
" %pip install \"numpy<2.0\" \"transformers>=4.43,<4.50\""
7272
]
7373
},

notebooks/text-to-image-genai/text-to-image-genai.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949
},
5050
{
5151
"cell_type": "code",
52-
"execution_count": 1,
52+
"execution_count": null,
5353
"id": "a292e4d0-8dc9-407e-94e7-fc777430bfd4",
5454
"metadata": {
5555
"test_replace": {
56-
"%pip install -q \"git+https://github.com/huggingface/optimum-intel.git\"\n": "%pip uninstall -q -y tensorflow tf_keras\n%pip install -q \"git+https://github.com/huggingface/optimum-intel.git\"\n"
56+
"%pip install -q \"git+https://github.com/huggingface/optimum-intel.git\" --extra-index-url https://download.pytorch.org/whl/cpu\n": "%pip uninstall -q -y tensorflow tf_keras\n%pip install -q \"git+https://github.com/huggingface/optimum-intel.git\" --extra-index-url https://download.pytorch.org/whl/cpu\n"
5757
}
5858
},
5959
"outputs": [],
@@ -64,7 +64,7 @@
6464
"\n",
6565
"\n",
6666
"%pip install -q -U \"openvino>=2025.0\" \"openvino-tokenizers>=2025.0\" \"openvino-genai>=2025.0\"\n",
67-
"%pip install -q -U \"transformers>=4.45\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
67+
"%pip install -q -U \"transformers>=4.45,<4.50\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
6868
"%pip install -q Pillow \"diffusers>=0.30.3\" \"gradio>=4.19\" \"typing_extensions>=4.9\" \"tqdm\"\n",
6969
"%pip install -q \"git+https://github.com/huggingface/optimum-intel.git\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
7070
"if platform.system() == \"Darwin\":\n",

notebooks/tiny-sd-image-generation/tiny-sd-image-generation.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"\n",
7676
"%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu \"torch>=2.1\" torchvision \"openvino>=2023.3.0\" \"opencv-python\" \"pillow\" \"diffusers>=0.18.0\" \"transformers>=4.45\" \"gradio>=4.19\"\n",
7777
"\n",
78-
"if platform.system() == \"Darwin\" and platform.processor() != \"arm\":\n",
78+
"if platform.system() == \"Darwin\" and platform.processor() != \"arm\":\n",
7979
" %pip install \"numpy<2.0\" \"transformers>=4.43,<4.50\""
8080
]
8181
},

0 commit comments

Comments
 (0)