ipyparallel icon indicating copy to clipboard operation
ipyparallel copied to clipboard

AsyncResult.join doesn't work

Open mesvam opened this issue 2 years ago • 0 comments

import ipyparallel as ipp
cluster = ipp.Cluster(n=4)
cluster.start_cluster_sync()

rc = cluster.connect_client_sync()
rc.wait_for_engines(n=4)

view = rc.load_balanced_view()
res = view.map(lambda x: x, [None]*3)
s = res.split()
ipp.client.asyncresult.AsyncResult.join(*s)
AttributeError                            Traceback (most recent call last)
Cell In[180], line 1
----> 1 ipp.client.asyncresult.AsyncResult.join(*res.split())

File ~\AppData\Local\Programs\Miniconda3\Lib\site-packages\ipyparallel\client\asyncresult.py:415, in AsyncResult.join(cls, *async_results)
    411 if len(async_results) == 1:
    412     # only one AsyncResult, nothing to join
    413     return first
--> 415 return cls(
    416     client=first._client,
    417     fname=first._fname,
    418     return_exceptions=first._return_exceptions,
    419     children=list(chain(ar._children for ar in async_results)),
    420     targets=list(chain(ar._targets for ar in async_results)),
    421     owner=False,
    422 )

File ~\AppData\Local\Programs\Miniconda3\Lib\site-packages\ipyparallel\client\asyncresult.py:92, in AsyncResult.__init__(self, client, children, fname, targets, owner, return_exceptions, chunk_sizes)
     90 else:
     91     self._children = children
---> 92     self.msg_ids = [f.msg_id for f in children]
     94 self._client = client
     95 self._fname = fname

File ~\AppData\Local\Programs\Miniconda3\Lib\site-packages\ipyparallel\client\asyncresult.py:92, in <listcomp>(.0)
     90 else:
     91     self._children = children
---> 92     self.msg_ids = [f.msg_id for f in children]
     94 self._client = client
     95 self._fname = fname

AttributeError: 'list' object has no attribute 'msg_id'

mesvam avatar Nov 30 '23 19:11 mesvam