[runtime_env] Remove get_current_runtime_env from docs (#22594)

We should just encourage people to use the existing `get_runtime_context` API instead of introducing a new one here. Just removing the docs for now while we discuss this.
This commit is contained in:
Edward Oakes 2022-02-23 16:53:52 -06:00 committed by GitHub
parent 87f7bfe4cd
commit 5a21289a34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 10 deletions

View file

@ -391,7 +391,7 @@ The runtime environment is inheritable, so it will apply to all tasks/actors wit
# ChildActor's actual `runtime_env` (specify runtime_env overrides)
{"env_vars": {"A": "a", "B": "b"}}
3. If you'd like to still use current runtime env, you can use the API :ref:`ray.get_current_runtime_env() <runtime-env-apis>` to get the current runtime env and modify it by yourself.
3. If you'd like to still use current runtime env, you can use the :ref:`ray.get_runtime_context() <runtime-context-apis>` API to get the current runtime env and modify it by yourself.
.. code-block:: python

View file

@ -208,13 +208,6 @@ Runtime Context APIs
.. autoclass:: ray.runtime_context.RuntimeContext
:members:
.. _runtime-env-apis:
Runtime Env APIs
--------------------
.. autofunction:: ray.runtime_env.get_current_runtime_env
.. _package-ref-debugging-apis:
Debugging APIs

View file

@ -1,10 +1,8 @@
import ray
from ray.util.annotations import PublicAPI
from ray._private.client_mode_hook import client_mode_hook
@PublicAPI(stability="beta")
@client_mode_hook(auto_init=False)
def get_current_runtime_env():
"""Get the runtime env of the current job/worker.