AMOOOMA commented on code in PR #37112:
URL: https://github.com/apache/beam/pull/37112#discussion_r2738806361


##########
sdks/python/apache_beam/utils/multi_process_shared.py:
##########
@@ -200,9 +226,99 @@ def __call__(self, *args, **kwargs):
   def __getattr__(self, name):
     return getattr(self._proxyObject, name)
 
+  def __setstate__(self, state):
+    self.__dict__.update(state)
+
+  def __getstate__(self):
+    return self.__dict__

Review Comment:
   Yeah if we return the MultiProcessShared object back it will probably ended 
up needing to be pickled for it to work. Unless the model manager doesn't hand 
back the model instance and only the tag, which then RunInference will try to 
create a MultiProcessShared object with the tag.
   
   Have model manager only manage and return the MPS tag might be a good way to 
do this, so that iiuc we won't need to pickle the model instance and saves a 
lot of RAM here. Although the tradeoff is just that model manager is less 
usable by other services if any. We can discuss in the meeting and see what to 
do best next. Thanks!



-- 
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]

Reply via email to