def test_load_OpenCLIPModel_from_local_path(self):
        """Test loading an OpenCLIP model from a local path."""
        model_tag = "my_test_model"
        model_properties = {
            "name": "ViT-B-32",
            "localpath": "/path/to/my_test_model.pt",
            "dimensions": 512,
            "type": "open_clip"
        }
        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.object(MagicMock(), 'eval', return_value=None) as mock_eval:
                    with patch("marqo.inference.native_inference.embedding_models.open_clip_model.os.path.exists",
                               return_value=True) as mock_path_exists:
                        model = OpenCLIPModel(model_properties=model_properties, device="cpu")
                        model.load()
                        mock_create_model.assert_called_once_with(
                            model_name="ViT-B-32",
                            jit=False,
                            pretrained="/path/to/my_test_model.pt",
                            precision="fp32", device="cpu",
                            cache_dir=ModelCache.clip_cache_path
                        )
                        mock_tokenizer.assert_called_once_with("ViT-B-32")
                        mock_path_exists.assert_called_once_with("/path/to/my_test_model.pt")
Test loading an OpenCLIP model from a local path.
tests/integ_tests/core/inference/test_open_clip_model_load.py