ray/doc/source/ray-core
Guyang Song 5783cdb254
[runtime env] runtime env inheritance refactor (#22244)
Runtime Environments is already GA in Ray 1.6.0. The latest doc is [here](https://docs.ray.io/en/master/ray-core/handling-dependencies.html#runtime-environments). And now, we already supported a [inheritance](https://docs.ray.io/en/master/ray-core/handling-dependencies.html#inheritance) behavior as follows (copied from the doc):
- The runtime_env["env_vars"] field will be merged with the runtime_env["env_vars"] field of the parent. This allows for environment variables set in the parent’s runtime environment to be automatically propagated to the child, even if new environment variables are set in the child’s runtime environment.
- Every other field in the runtime_env will be overridden by the child, not merged. For example, if runtime_env["py_modules"] is specified, it will replace the runtime_env["py_modules"] field of the parent.

We think this runtime env merging logic is so complex and confusing to users because users can't know the final runtime env before the jobs are run.

Current PR tries to do a refactor and change the behavior of Runtime Environments inheritance. Here is the new behavior:
- **If there is no runtime env option when we create actor, inherit the parent runtime env.**
- **Otherwise, use the optional runtime env directly and don't do the merging.**

Add a new API named `ray.runtime_env.get_current_runtime_env()` to get the parent runtime env and modify this dict by yourself. Like:
```Actor.options(runtime_env=ray.runtime_env.get_current_runtime_env().update({"X": "Y"}))```
This new API also can be used in ray client.
2022-02-21 18:13:22 +08:00
..
_examples [docs] sphinx gallery removal, migrate to ipynb (#22467) 2022-02-19 01:19:07 -08:00
doc_code [docs] sphinx gallery removal, migrate to ipynb (#22467) 2022-02-19 01:19:07 -08:00
examples [docs] sphinx gallery removal, migrate to ipynb (#22467) 2022-02-19 01:19:07 -08:00
images [docs] new structure (#21776) 2022-01-21 15:42:05 -08:00
actors.rst [docs] integrate algolia docsearch, move to sphinx panels (#21814) 2022-01-24 17:00:41 -08:00
advanced.rst [docs] new structure (#21776) 2022-01-21 15:42:05 -08:00
async_api.rst [docs] new structure (#21776) 2022-01-21 15:42:05 -08:00
concurrency_group_api.rst [doc][Java] Add doc page for java concurrency group. (#21600) 2022-02-16 17:57:03 +08:00
configure.rst [Doc] Remove the legacy doc (#21996) 2022-01-31 15:26:19 -08:00
cross-language.rst [docs] integrate algolia docsearch, move to sphinx panels (#21814) 2022-01-24 17:00:41 -08:00
download_zip_url.png [docs] new structure (#21776) 2022-01-21 15:42:05 -08:00
fault-tolerance.rst [Doc] Add actor max restarts default value to fault tolerance doc (#22481) 2022-02-18 17:48:22 -06:00
handling-dependencies.rst [runtime env] runtime env inheritance refactor (#22244) 2022-02-21 18:13:22 +08:00
memory-management.rst [docs] new structure (#21776) 2022-01-21 15:42:05 -08:00
namespaces.rst [docs] integrate algolia docsearch, move to sphinx panels (#21814) 2022-01-24 17:00:41 -08:00
package-ref.rst [runtime env] runtime env inheritance refactor (#22244) 2022-02-21 18:13:22 +08:00
placement-group.rst [docs] integrate algolia docsearch, move to sphinx panels (#21814) 2022-01-24 17:00:41 -08:00
ray-dashboard.rst [docs] new structure (#21776) 2022-01-21 15:42:05 -08:00
ray_repo.png [docs] new structure (#21776) 2022-01-21 15:42:05 -08:00
serialization.rst [docs] new structure (#21776) 2022-01-21 15:42:05 -08:00
starting-ray.rst [Doc] Fix bad doc and recover doc of c++ api (#22213) 2022-02-08 19:04:37 +08:00
troubleshooting.rst [docs] new structure (#21776) 2022-01-21 15:42:05 -08:00
using-ray-with-gpus.rst [docs] new structure (#21776) 2022-01-21 15:42:05 -08:00
using-ray-with-jupyter.rst [docs] new structure (#21776) 2022-01-21 15:42:05 -08:00
using-ray-with-pytorch.rst [docs] sphinx gallery removal, migrate to ipynb (#22467) 2022-02-19 01:19:07 -08:00
using-ray-with-tensorflow.rst [docs] sphinx gallery removal, migrate to ipynb (#22467) 2022-02-19 01:19:07 -08:00
using-ray.rst [docs] new structure (#21776) 2022-01-21 15:42:05 -08:00
walkthrough.rst [Doc] Fix bad doc and recover doc of c++ api (#22213) 2022-02-08 19:04:37 +08:00