mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 22:38:16 +08:00
Fetch the object after requesting reconstruction during ray.get (#301)
* Fetch the object after requesting reconstruction during ray.get * revert * Fix documentation and memory leak * Fix hanging reconstruction bug * Fix for python3
This commit is contained in:
committed by
Robert Nishihara
parent
2220a33b62
commit
334aed9fa9
@@ -460,6 +460,7 @@ class Worker(object):
|
||||
object_ids (List[object_id.ObjectID]): A list of the object IDs whose
|
||||
values should be retrieved.
|
||||
"""
|
||||
# Do an initial fetch for remote objects.
|
||||
self.plasma_client.fetch([object_id.id() for object_id in object_ids])
|
||||
|
||||
# Get the objects. We initially try to get the objects immediately.
|
||||
@@ -477,6 +478,9 @@ class Worker(object):
|
||||
while len(unready_ids) > 0:
|
||||
for unready_id in unready_ids:
|
||||
self.photon_client.reconstruct_object(unready_id)
|
||||
# Do another fetch for objects that aren't available locally yet, in case
|
||||
# they were evicted since the last fetch.
|
||||
self.plasma_client.fetch(list(unready_ids.keys()))
|
||||
results = numbuf.retrieve_list(list(unready_ids.keys()),
|
||||
self.plasma_client.conn,
|
||||
GET_TIMEOUT_MILLISECONDS)
|
||||
|
||||
Reference in New Issue
Block a user