mirror of
https://github.com/wassname/ray.git
synced 2026-07-10 22:34:08 +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
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user