mirror of
https://github.com/wassname/ray.git
synced 2026-07-26 13:37:24 +08:00
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:
committed by
Philipp Moritz
parent
042ad84573
commit
5f71751891
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user