Skip to content

Commit

Permalink
Deprecate RuntimeContext.get (ray-project#33734)
Browse files Browse the repository at this point in the history
RuntimeContext.get exposes Cython ids instead of strings so we should deprecate it and in favor of get_xxx_id() methods.

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
Signed-off-by: elliottower <elliot@elliottower.com>
  • Loading branch information
jjyao authored and elliottower committed Apr 22, 2023
1 parent acb701f commit 3ae6a77
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/ray/runtime_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ def __init__(self, worker):
assert worker is not None
self.worker = worker

@Deprecated(
message="Use get_xxx_id() methods to get relevant ids instead", warning=True
)
def get(self) -> Dict[str, Any]:
"""Get a dictionary of the current context.
Expand Down

0 comments on commit 3ae6a77

Please sign in to comment.