Skip to content

Commit

Permalink
Update model_service_worker.py (#2809)
Browse files Browse the repository at this point in the history
  • Loading branch information
InakiRaba91 authored Nov 23, 2023
1 parent 2e1d7c6 commit f5d868e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ts/model_service_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def handle_connection(self, cl_socket):
cmd, msg = retrieve_msg(cl_socket)
if BENCHMARK:
pr.enable()
# b"I" encodes a model Inference request from frontend
if cmd == b"I":
if service is not None:
resp = service.predict(msg)
Expand All @@ -185,6 +186,7 @@ def handle_connection(self, cl_socket):
raise RuntimeError(
"Received command: {}, but service is not loaded".format(cmd)
)
# b"I" encodes a model Loading request from frontend
elif cmd == b"L":
service, result, code = self.load_model(msg)
resp = bytearray()
Expand Down

0 comments on commit f5d868e

Please sign in to comment.