def test_load_OpenCLIPModelFromCheckPointParameters_success(self):
        """Test correct parameters are passed to the OpenCLIP loading from checkpoint method."""
        model_tag = "my_test_model"
        model_properties = {
            "name": "ViT-B-108",
            "url": "https://openclipart.org/download/12345/my_test_model.pt",
            "type": "open_clip",
            "dimensions": 512
        }
        with patch("marqo.inference.native_inference.embedding_models.open_clip_model.open_clip.create_model", return_value=MagicMock()) \
                as mock_create_model:
            with patch("marqo.inference.native_inference.embedding_models.open_clip_model.open_clip.get_tokenizer", return_value=MagicMock()) \
                    as mock_tokenizer:
                with patch("marqo.inference.native_inference.embedding_models.open_clip_model.download_model", return_value="my_test_model.pt"):
                    with patch.object(MagicMock(), 'eval', return_value=None) as mock_eval:
                        model = OpenCLIPModel(model_properties=model_properties, device="cpu")
                        model.load()
                        mock_create_model.assert_called_once_with(
                            model_name="ViT-B-108",
                            jit=False,
                            pretrained="my_test_model.pt",
                            precision="fp32", device="cpu",
                            cache_dir=ModelCache.clip_cache_path
                        )
                        mock_tokenizer.assert_called_once_with("ViT-B-108")
                        preprocess_config = model.image_preprocessor_config
                        self.assertEqual(224, preprocess_config.size)
                        self.assertEqual("RGB", preprocess_config.mode)
                        self.assertEqual((0.48145466, 0.4578275, 0.40821073), preprocess_config.mean)
                        self.assertEqual((0.26862954, 0.26130258, 0.27577711), preprocess_config.std)
                        self.assertEqual("bicubic", preprocess_config.interpolation)
                        self.assertEqual("shortest", preprocess_config.resize_mode)
                        self.assertEqual(0, preprocess_config.fill_color)
Test correct parameters are passed to the OpenCLIP loading from checkpoint method.
tests/integ_tests/core/inference/test_open_clip_model_load.py