[RLlib] Cleanup examples folder #13. Fix main examples docs page for RLlib.#45382
Conversation
…rithm_config_dissolve_resources_method
…nup_examples_folder_11_fractional_gpus
…p_examples_folder_11_fractional_gpus
…p_examples_folder_11_fractional_gpus # Conflicts: # rllib/utils/test_utils.py
angelinalg
left a comment
There was a problem hiding this comment.
Just some style nits and a few typos.
rllib/utils/error.py
Outdated
| `num_gpus_per_worker` to 0 (they may be set to 1 by default for your | ||
| particular RL algorithm).""" | ||
| machine does not have any GPUs, you should set the config keys | ||
| `num_gpus_per_learner` and `num_gpus_per_env_runner` to 0 (they may be set to |
There was a problem hiding this comment.
| `num_gpus_per_learner` and `num_gpus_per_env_runner` to 0 (they may be set to | |
| `num_gpus_per_learner` and `num_gpus_per_env_runner` to 0. They may be set to |
rllib/utils/error.py
Outdated
| particular RL algorithm).""" | ||
| machine does not have any GPUs, you should set the config keys | ||
| `num_gpus_per_learner` and `num_gpus_per_env_runner` to 0 (they may be set to | ||
| 1 by default for your particular RL algorithm).""" |
There was a problem hiding this comment.
| 1 by default for your particular RL algorithm).""" | |
| 1 by default for your particular RL algorithm.""" |
rllib/utils/error.py
Outdated
| 1 by default for your particular RL algorithm).""" | ||
|
|
||
| ERR_MSG_INVALID_ENV_DESCRIPTOR = """The env string you provided ('{}') is: | ||
| a) Not a supported/installed environment. |
There was a problem hiding this comment.
| a) Not a supported/installed environment. | |
| a) Not a supported or installed environment. |
rllib/utils/test_utils.py
Outdated
| @@ -1346,6 +1347,11 @@ def run_rllib_example_script_experiment( | |||
| tune_callbacks: A list of Tune callbacks to configure with the tune.Tuner. | |||
| In case `args.wandb_key` is provided, will append a WandB logger to this | |||
There was a problem hiding this comment.
| In case `args.wandb_key` is provided, will append a WandB logger to this | |
| In case `args.wandb_key` is provided, appends a WandB logger to this |
rllib/utils/test_utils.py
Outdated
| keep_config: Set this to True, if you don't want this utility to change the | ||
| given `base_config` in any way and leave it as-is. This is helpful | ||
| for example script that want to demonstrate how to set those settings | ||
| that are usually taken care of automatically in this function (e.g. |
There was a problem hiding this comment.
| that are usually taken care of automatically in this function (e.g. | |
| that are usually taken care of automatically in this function (e.g., |
…nup_examples_folder_13_folder_readme Signed-off-by: sven1977 <svenmika1977@gmail.com> # Conflicts: # doc/source/rllib/rllib-advanced-api.rst # doc/source/rllib/rllib-learner.rst # rllib/BUILD # rllib/algorithms/algorithm.py # rllib/algorithms/algorithm_config.py # rllib/algorithms/dreamerv3/tests/test_dreamerv3.py # rllib/core/learner/learner.py # rllib/core/learner/scaling_config.py # rllib/examples/checkpoints/restore_1_of_n_agents_from_checkpoint.py # rllib/examples/gpus/fractional_gpus_per_learner.py # rllib/tuned_examples/dreamerv3/atari_100k.py # rllib/tuned_examples/dreamerv3/atari_200M.py # rllib/tuned_examples/dreamerv3/dm_control_suite_vision.py # rllib/utils/test_utils.py
…nup_examples_folder_13_folder_readme
…nup_examples_folder_13_folder_readme
Co-authored-by: angelinalg <122562471+angelinalg@users.noreply.github.com> Signed-off-by: Sven Mika <sven@anyscale.io>
Co-authored-by: angelinalg <122562471+angelinalg@users.noreply.github.com> Signed-off-by: Sven Mika <sven@anyscale.io>
Co-authored-by: angelinalg <122562471+angelinalg@users.noreply.github.com> Signed-off-by: Sven Mika <sven@anyscale.io>
…r_readme' into cleanup_examples_folder_13_folder_readme
…nup_examples_folder_13_folder_readme
…nup_examples_folder_13_folder_readme Signed-off-by: sven1977 <svenmika1977@gmail.com> # Conflicts: # rllib/examples/inference/policy_inference_after_training.py
| RLlib uses `Ray actors <actors.html>`__ to scale training from a single core to many thousands of cores in a cluster. | ||
| You can `configure the parallelism <rllib-training.html#specifying-resources>`__ used for training by changing the ``num_env_runners`` parameter. | ||
| Check out our `scaling guide <rllib-training.html#scaling-guide>`__ for more details here. | ||
| See this `scaling guide <rllib-training.html#scaling-guide>`__ for more details here. |
There was a problem hiding this comment.
The scaling guide also needs to be overhauled.
| an index into the available | ||
| CUDA devices. For example if `os.environ["CUDA_VISIBLE_DEVICES"] = "1"` | ||
| then a `local_gpu_idx` of 0 will use the GPU with ID=1 on the node. | ||
| and `local_gpu_idx=0`, RLlib uses the GPU with ID=1 on the node. |
There was a problem hiding this comment.
This feels counterintuitive. The GPU index 0 does not equal the environment variable 1 and we have two or more GPUs for a single learner. A user would expect a single GPU for a single learner when multiple GPUs are available on a node to be indicated with an ID or index. Do I misunderstand sth here?
| `num_learners` x `train_batch_size_per_learner` and can | ||
| be accessed via the property `AlgorithmConfig.total_train_batch_size`. | ||
| `num_learners` x `train_batch_size_per_learner` and you can | ||
| access it with the property `AlgorithmConfig.total_train_batch_size`. |
There was a problem hiding this comment.
We should refer hereto in the scaling guide ~ if not done yet.
…nup_examples_folder_13_folder_readme
…s page for RLlib. (ray-project#45382) Signed-off-by: Richard Liu <ricliu@google.com>
Cleanup examples folder #13. Fix main examples docs page for RLlib.
Why are these changes needed?
Related issue number
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.