API cleanups. Remove worker argument. Remove some deprecated arguments. (#4025)

* Remove worker argument from API methods.

* Remove deprecated arguments and deprecate redirect_output and redirect_worker_output.

* Fix
This commit is contained in:
Robert Nishihara
2019-02-15 10:49:16 -08:00
committed by Philipp Moritz
parent 042ad84573
commit 5f71751891
24 changed files with 171 additions and 217 deletions
+3 -4
View File
@@ -8,7 +8,7 @@ from ray import profiling
__all__ = ["free"]
def free(object_ids, local_only=False, worker=None):
def free(object_ids, local_only=False):
"""Free a list of IDs from object stores.
This function is a low-level API which should be used in restricted
@@ -26,8 +26,7 @@ def free(object_ids, local_only=False, worker=None):
local_only (bool): Whether only deleting the list of objects in local
object store or all object stores.
"""
if worker is None:
worker = ray.worker.get_global_worker()
worker = ray.worker.get_global_worker()
if isinstance(object_ids, ray.ObjectID):
object_ids = [object_ids]
@@ -37,7 +36,7 @@ def free(object_ids, local_only=False, worker=None):
type(object_ids)))
worker.check_connected()
with profiling.profile("ray.free", worker=worker):
with profiling.profile("ray.free"):
if len(object_ids) == 0:
return