Skip to content

Commit 47e0ffb

Browse files
committed
Only pop metrics if it exists
1 parent e8c35b3 commit 47e0ffb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: python/coglet/file_runner.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ async def _predict(self, pid: str, req: Dict[str, Any]) -> None:
214214
finally:
215215
resp['completed_at'] = util.now_iso()
216216
self._respond(pid, epoch, resp)
217-
scope.metrics.pop(pid)
217+
if pid in scope.metrics:
218+
scope.metrics.pop(pid)
218219
epoch += 1
219220

220221
def _respond(

0 commit comments

Comments
 (0)