Skip to content

Commit

Permalink
add batch size metric (#1750)
Browse files Browse the repository at this point in the history
Signed-off-by: technillogue <[email protected]>
  • Loading branch information
technillogue authored Jun 18, 2024
1 parent 42c6617 commit adf8894
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/cog/server/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit adf8894

Please sign in to comment.