From adf88944dda9f6dc3781d5f5de2463dc3b71ced4 Mon Sep 17 00:00:00 2001 From: technillogue Date: Tue, 18 Jun 2024 18:39:31 -0400 Subject: [PATCH] add batch size metric (#1750) Signed-off-by: technillogue --- python/cog/server/runner.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/cog/server/runner.py b/python/cog/server/runner.py index f31ea0b36f..6f3849e9a6 100644 --- a/python/cog/server/runner.py +++ b/python/cog/server/runner.py @@ -511,6 +511,7 @@ async def succeeded(self) -> None: if self.time_share_tracker and self.p.id: time_share = self.time_share_tracker.end_tracking(self.p.id) self.p.metrics["predict_time_share"] = time_share + self.p.metrics["batch_size"] = self.p.metrics["predict_time"] / time_share await self._send_webhook(schema.WebhookEvent.COMPLETED) async def failed(self, error: str) -> None: