AMOOOMA commented on code in PR #37528:
URL: https://github.com/apache/beam/pull/37528#discussion_r2776020195
##########
sdks/python/apache_beam/ml/inference/model_manager.py:
##########
@@ -508,19 +538,17 @@ def acquire_model(self, tag: str, loader_func:
Callable[[], Any]) -> Any:
finally:
# Remove self from wait queue once done
- if self._wait_queue and self._wait_queue[0][2] is my_id:
+ if self._wait_queue and self._wait_queue[0].ticket_num == ticket_num:
heapq.heappop(self._wait_queue)
else:
logger.warning(
"Item not at head of wait queue during cleanup"
", this is not expected: tag=%s ticket num=%s",
tag,
ticket_num)
Review Comment:
Yeah it could happen still if the ticket timed out, I will remove this
warning check though since it doesn't really help much and needs to grab the
logging lock for timeout which is not great.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]