Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RLlib] Activate APPO cont. actions release- and CI tests (HalfCheetah-v1 and Pendulum-v1 new in tuned_examples). #49068

Merged

Conversation

sven1977
Copy link
Contributor

@sven1977 sven1977 commented Dec 4, 2024

Activate APPO cont. actions release- and CI tests (HalfCheetah-v1 and Pendulum-v1 new in tuned_examples).

Why are these changes needed?

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Sorry, something went wrong.

Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
@sven1977 sven1977 added rllib RLlib related issues rllib-algorithms An RLlib algorithm/Trainer is not learning. rllib-newstack labels Dec 4, 2024
Signed-off-by: sven1977 <svenmika1977@gmail.com>
@@ -137,9 +137,9 @@ click the dropdowns below:
+-------------------------------------------------------------------------+----------------+---------------+-------------+------------+-------------+------------------------+
| **High-throughput Architectures** |
+-------------------------------------------------------------------------+----------------+---------------+-------------+------------+-------------+------------------------+
| :ref:`IMPALA (Importance Weighted Actor-Learner Architecture) <impala>` | |single_agent| | |multi_agent| | |discr_act| | | |multi_gpu| | |multi_node_multi_gpu| |
| :ref:`APPO (Asynchronous Proximal Policy Optimization) <appo>` | |single_agent| | |multi_agent| | |discr_act| | |cont_act| | |multi_gpu| | |multi_node_multi_gpu| |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flipped this to place APPO more prominently than IMPALA.

@@ -30,9 +30,9 @@ as well as multi-GPU training on multi-node (GPU) clusters when using the `Anysc
+-----------------------------------------------------------------------------+------------------------------+------------------------------------+--------------------------------+
| **High-throughput on- and off policy** |
+-----------------------------------------------------------------------------+------------------------------+------------------------------------+--------------------------------+
| :ref:`IMPALA (Importance Weighted Actor-Learner Architecture) <impala>` | |single_agent| |multi_agent| | |multi_gpu| |multi_node_multi_gpu| | |discr_actions| |
| :ref:`APPO (Asynchronous Proximal Policy Optimization) <appo>` | |single_agent| |multi_agent| | |multi_gpu| |multi_node_multi_gpu| | |cont_actions| |discr_actions| |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@@ -2552,6 +2552,37 @@
cluster:
cluster_compute: 2gpus_64cpus_gce.yaml

- name: rllib_learning_tests_halfcheetah_appo_torch
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new HalfCheetah APPO release test

Copy link
Collaborator

@simonsays1980 simonsays1980 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Awesome that we are now having this fixed and market continuous acitons. Thanks for the hard work @sven1977 !!

RLlib doesn't always synch back the weights to the EnvRunners right after a new model version is available.
To account for the EnvRunners being off-policy, APPO uses a procedure called v-trace,
`described in the IMPALA paper <https://arxiv.org/abs/1802.01561>`__.
APPO scales out on both axes, supporting multiple EnvRunners for sample collection and multiple GPU- or CPU-based Learners
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A monster :)

@@ -2552,6 +2552,37 @@
cluster:
cluster_compute: 2gpus_64cpus_gce.yaml

- name: rllib_learning_tests_halfcheetah_appo_torch
group: RLlib tests
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have to use this in the future for elaborate algorithm tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you mean?

This will run nightly now under the release pipeline, so it'll be covered and we won't miss if we break stuff.

.env_runners(
num_envs_per_env_runner=20,
)
.learners(num_learners=1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't a single remote learner inefficient?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For CPU-only, it's actually better :p
For 1 GPU, num_learners=0 is better. We have to do some more exploration as to why exactly for 1 CPU, the num_learners=1 setting is better. I'm guessing it has to do with the Learner worker then sharing the same thread/process as the Algo, which could slow down things. For the GPU setup, this is NOT a problem as CUDA is async anyways (can do the forward/backward passes parallel to the CPU).

@sven1977 sven1977 enabled auto-merge (squash) December 4, 2024 14:08
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label Dec 4, 2024
@sven1977 sven1977 merged commit 26824a3 into ray-project:master Dec 4, 2024
7 checks passed
@sven1977 sven1977 deleted the appo_halfcheetah_tuned_example branch December 5, 2024 12:31
ujjawal-khare pushed a commit to ujjawal-khare-27/ray that referenced this pull request Dec 17, 2024
…h-v1 and Pendulum-v1 new in `tuned_examples`). (ray-project#49068)

Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests rllib RLlib related issues rllib-algorithms An RLlib algorithm/Trainer is not learning. rllib-newstack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants