From cbc9ced323be110386a16d7c092a00976d7ac499 Mon Sep 17 00:00:00 2001 From: dan nelson Date: Mon, 9 Jun 2025 21:16:46 -0700 Subject: [PATCH 1/2] timeout error now with text --- cog_safe_push/predict.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cog_safe_push/predict.py b/cog_safe_push/predict.py index b56ca96..09290ee 100644 --- a/cog_safe_push/predict.py +++ b/cog_safe_push/predict.py @@ -271,7 +271,7 @@ async def predict( while prediction.status not in ["succeeded", "failed", "canceled"]: await asyncio.sleep(0.5) if time.time() - start_time > timeout_seconds: - raise PredictionTimeoutError() + raise PredictionTimeoutError(f"{prefix} Prediction timed out after {timeout_seconds} seconds") prediction.reload() duration = time.time() - start_time From 677fce571f7f52edc8f2c50c3e4ef93f71e043f7 Mon Sep 17 00:00:00 2001 From: Dan Nelson Date: Mon, 9 Jun 2025 21:22:56 -0700 Subject: [PATCH 2/2] Update cog_safe_push/predict.py Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --- cog_safe_push/predict.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cog_safe_push/predict.py b/cog_safe_push/predict.py index 09290ee..32eaae9 100644 --- a/cog_safe_push/predict.py +++ b/cog_safe_push/predict.py @@ -271,7 +271,7 @@ async def predict( while prediction.status not in ["succeeded", "failed", "canceled"]: await asyncio.sleep(0.5) if time.time() - start_time > timeout_seconds: - raise PredictionTimeoutError(f"{prefix} Prediction timed out after {timeout_seconds} seconds") + raise PredictionTimeoutError(f"{prefix}Prediction timed out after {timeout_seconds} seconds") prediction.reload() duration = time.time() - start_time