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
+2 -3
View File
@@ -27,7 +27,7 @@ class _NullLogSpan(object):
NULL_LOG_SPAN = _NullLogSpan()
def profile(event_type, extra_data=None, worker=None):
def profile(event_type, extra_data=None):
"""Profile a span of time so that it appears in the timeline visualization.
Note that this only works in the raylet code path.
@@ -57,8 +57,7 @@ def profile(event_type, extra_data=None, worker=None):
Returns:
An object that can profile a span of time via a "with" statement.
"""
if worker is None:
worker = ray.worker.global_worker
worker = ray.worker.global_worker
return RayLogSpanRaylet(worker.profiler, event_type, extra_data=extra_data)