Fix bug in which actor classes are not exported multiple times. (#4838)

This commit is contained in:
Robert Nishihara
2019-05-23 09:22:46 -07:00
committed by GitHub
parent 1a39fee9c6
commit 2015085192
3 changed files with 39 additions and 6 deletions
+3 -1
View File
@@ -43,6 +43,9 @@ class RemoteFunction(object):
return the resulting ObjectIDs. For an example, see
"test_decorated_function" in "python/ray/tests/test_basic.py".
_function_signature: The function signature.
_last_export_session: The index of the last session in which the remote
function was exported. This is used to determine if we need to
export the remote function again.
"""
def __init__(self, function, num_cpus, num_gpus, resources,
@@ -68,7 +71,6 @@ class RemoteFunction(object):
# Export the function.
worker = ray.worker.get_global_worker()
# In which session this function was exported last time.
self._last_export_session = worker._session_index
worker.function_actor_manager.export(self)