[ID Refactor] Rename DriverID to JobID (#5004)

* WIP

WIP

WIP

Rename Driver -> Job

Fix complition

Fix

Rename in Java

In py

WIP

Fix

WIP

Fix

Fix test

Fix

Fix C++ linting

Fix

* Update java/runtime/src/main/java/org/ray/runtime/config/RayConfig.java

Co-Authored-By: Stephanie Wang <swang@cs.berkeley.edu>

* Update src/ray/core_worker/core_worker.cc

Co-Authored-By: Stephanie Wang <swang@cs.berkeley.edu>

* Address comments

* Fix

* Fix CI

* Fix cpp linting

* Fix py lint

* FIx

* Address comments and fix

* Address comments

* Address

* Fix import_threading
This commit is contained in:
Qing Wang
2019-06-28 00:44:51 +08:00
committed by GitHub
parent d9768c1cd2
commit 62e4b591e3
79 changed files with 961 additions and 974 deletions
+5 -5
View File
@@ -44,7 +44,7 @@ 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_driver_id_exported_for: The ID of the driver ID of the last Ray
_last_job_id_exported_for: The ID of the job ID of the last Ray
session during which this remote function definition was exported.
This is an imperfect mechanism used to determine if we need to
export the remote function again. It is imperfect in the sense that
@@ -73,7 +73,7 @@ class RemoteFunction(object):
self._function_signature = ray.signature.extract_signature(
self._function)
self._last_driver_id_exported_for = None
self._last_job_id_exported_for = None
# Override task.remote's signature and docstring
@wraps(function)
@@ -115,11 +115,11 @@ class RemoteFunction(object):
worker = ray.worker.get_global_worker()
worker.check_connected()
if (self._last_driver_id_exported_for is None
or self._last_driver_id_exported_for != worker.task_driver_id):
if (self._last_job_id_exported_for is None
or self._last_job_id_exported_for != worker.current_job_id):
# If this function was exported in a previous session, we need to
# export this function again, because current GCS doesn't have it.
self._last_driver_id_exported_for = worker.task_driver_id
self._last_job_id_exported_for = worker.current_job_id
worker.function_actor_manager.export(self)
kwargs = {} if kwargs is None else kwargs