From 8716b8e16e7e99c6fa73795dd6c56e463c0f28bd Mon Sep 17 00:00:00 2001 From: Jona Date: Thu, 10 Aug 2023 03:05:37 +0100 Subject: [PATCH] Oops --- cerulean_cloud/cloud_run_offset_tiles/handler.py | 3 ++- cerulean_cloud/cloud_run_orchestrator/clients.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cerulean_cloud/cloud_run_offset_tiles/handler.py b/cerulean_cloud/cloud_run_offset_tiles/handler.py index 2d775cf1..482dfcf4 100644 --- a/cerulean_cloud/cloud_run_offset_tiles/handler.py +++ b/cerulean_cloud/cloud_run_offset_tiles/handler.py @@ -20,6 +20,7 @@ from cerulean_cloud.auth import api_key_auth from cerulean_cloud.cloud_run_offset_tiles.schema import ( + InferenceInput, InferenceResult, InferenceResultStack, PredictPayload, @@ -107,7 +108,7 @@ def ping() -> Dict: def _predict( - inf_stack: List, model, inf_parms: Dict + inf_stack: List[InferenceInput], model, inf_parms: Dict ) -> List[ Union[ Tuple[np.ndarray, np.ndarray, List[float]], diff --git a/cerulean_cloud/cloud_run_orchestrator/clients.py b/cerulean_cloud/cloud_run_orchestrator/clients.py index a4afb807..edfbdb2f 100644 --- a/cerulean_cloud/cloud_run_orchestrator/clients.py +++ b/cerulean_cloud/cloud_run_orchestrator/clients.py @@ -94,7 +94,7 @@ async def get_base_tile_inference( inf_stack=inf_stack, inf_parms=self.inference_parms ) res = await self.client.post( - self.url + "/predict", json=payload, timeout=None + self.url + "/predict", json=payload.dict(), timeout=None ) return InferenceResultStack(**res.json()) @@ -123,7 +123,7 @@ async def get_offset_tile_inference( inf_stack=inf_stack, inf_parms=self.inference_parms ) res = await self.client.post( - self.url + "/predict", json=payload, timeout=None + self.url + "/predict", json=payload.dict(), timeout=None ) return InferenceResultStack(**res.json())