def load_model(self, model_id: str) -> Optional[dict]:
        """Load the model from the cache directory."""
        model_json_path = self.get_model_json_path(model_id)
        if model_json_path.exists():
            try:
                logger.info("Loading model %s from cache.", model_id)
                with model_json_path.open() as f:
                    return json.load(f)
            except Exception:
                logger.exception("Failed to load model from local cache.")

        if self.enable_shared_cache:
            return self.shared_cache.load_model(model_id, model_json_path)

        return None
Load the model from the cache directory.
olive/cache.py