Skip to content

Commit

Permalink
remove unnecessary
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Jan 31, 2025
1 parent bb5ee65 commit 000b1ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/openvino/test_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,7 @@ def test_load_from_hub_and_save_visual_language_model(self):
else:
self.assertEqual(component.request.get_property("PERFORMANCE_HINT"), "LATENCY")

processor.patch_size = 16
# sould be fixed in https://huggingface.co/katuni4ka/tiny-random-llava-ov/blob/main/processor_config.json#L3
processor.patch_size = loaded_model.config.vision_config.patch_size
inputs = processor(images=image, text=prompt, return_tensors="pt")
set_seed(SEED)
loaded_model_outputs = loaded_model(**inputs)
Expand Down Expand Up @@ -2247,8 +2246,9 @@ def test_llava_with_new_preprocessing(self, model_arch):
self.assertTrue(processor.patch_size is not None)
self.assertTrue(processor.vision_feature_select_strategy is not None)
inputs = processor(images=self.IMAGE, text=prompt, return_tensors="pt")
self.assertTrue(
(inputs.input_ids == ov_model.config.image_token_index).sum(1).max() >= ov_model.config.image_seq_length
self.assertGreaterEqual(
(inputs.input_ids == ov_model.config.image_token_index).sum().max().item(),
ov_model.config.image_seq_length,
)
set_seed(SEED)
with torch.no_grad():
Expand Down

0 comments on commit 000b1ac

Please sign in to comment.