def vectorise(self, request: InferenceRequest) -> InferenceResult:
        """
        Sends the inference request encoded with MessagePack (using msgpack_numpy) to the remote FastAPI endpoint
        and returns the deserialized inference result.
        """
        url = f"{self.base_url}/vectorise"
        headers = {"Content-Type": "application/msgpack", "Accept": "application/msgpack"}

        # Convert the request to a dict (honoring aliases) and then pack with MessagePack
        request_dict = request.dict(by_alias=True)
        request_bytes = msgpack.packb(request_dict, use_bin_type=True)

        try:
            response = self.client.post(url, headers=headers, content=request_bytes)
            response.raise_for_status()
        except httpx.HTTPError as e:
            # The error response is also msgpack encoded
            if isinstance(e, httpx.HTTPStatusError) and e.response is not None and e.response.content:
                try:
                    error_response = msgpack.unpackb(e.response.content, raw=False)
                    error_message = error_response["detail"]
                except (msgpack.ExtraData, msgpack.UnpackException, msgpack.UnpackValueError):
                    logger.warning('Error parsing error message', exc_info=True)
                    error_message = 'Error parsing error message in msgpack format'
            else:
                error_message = str(e)
            raise InferenceError(f"HTTP error when calling remote inference service: {error_message}") from e

        # Unpack the MessagePack response (with numpy support)
        try:
            result_dict = msgpack.unpackb(response.content, raw=False)
            return InferenceResult.parse_obj(result_dict)
        except (msgpack.ExtraData, msgpack.UnpackException, msgpack.UnpackValueError, ValidationError) as e:
            raise InferenceError(f"Error decoding MessagePack response: {str(e)}") from e

        Sends the inference request encoded with MessagePack (using msgpack_numpy) to the remote FastAPI endpoint
        and returns the deserialized inference result.
        
src/marqo/inference/native_inference/remote/client/inference_client.py