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] Cleanup examples folder (new API stack) vol 31: Add hierarchical training example script. #49127

Conversation

sven1977
Copy link
Contributor

@sven1977 sven1977 commented Dec 6, 2024

Cleanup examples folder (new API stack) vol 31:

  • Add new example env (six room env) with two versions: flat and hierarchical.
  • Add hierarchical training example script.

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 :(

Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
@sven1977 sven1977 added rllib RLlib related issues rllib-env rllib env related issues rllib-docs-or-examples Issues related to RLlib documentation or rllib/examples rllib-newstack rllib-oldstack-cleanup Issues related to cleaning up classes, utilities on the old API stack labels Dec 6, 2024
Signed-off-by: sven1977 <svenmika1977@gmail.com>
@sven1977 sven1977 requested review from maxpumperla and a team as code owners December 6, 2024 12:20
Hierarchical Training
+++++++++++++++++++++

- `Policy Inference after Training <https://github.com/ray-project/ray/blob/master/rllib/examples/inference/policy_inference_after_training.py>`__:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry, still WIP ... please ignore this change here for now

@@ -533,9 +533,18 @@ def _get_int_index(
):
data_to_use = self.data
if _ignore_last_ts:
data_to_use = self.data[:-1]
if self.finalized:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these were all bugs

Signed-off-by: sven1977 <svenmika1977@gmail.com>
return {
key: sub_buffer.get(
indices=index_incl_lookback - sub_buffer.lookback,
neg_index_as_lookback=True,
fill=fill,
_add_last_ts_value=hanging_val,
_add_last_ts_value=(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

another bug fix

Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
…xamples_folder_31_hierarchical_training

# Conflicts:
#	rllib/env/multi_agent_episode.py
#	rllib/env/single_agent_episode.py
#	rllib/env/tests/test_multi_agent_episode.py
#	rllib/env/utils/infinite_lookback_buffer.py
@sven1977 sven1977 requested a review from a team as a code owner December 10, 2024 18:45
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
…nup_examples_folder_31_hierarchical_training

Signed-off-by: sven1977 <svenmika1977@gmail.com>

# Conflicts:
#	rllib/env/multi_agent_episode.py
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
@sven1977 sven1977 enabled auto-merge (squash) December 11, 2024 12:29
@github-actions github-actions bot disabled auto-merge December 11, 2024 12:29
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label Dec 11, 2024
Signed-off-by: sven1977 <svenmika1977@gmail.com>
@sven1977 sven1977 enabled auto-merge (squash) December 11, 2024 12:36
Signed-off-by: sven1977 <svenmika1977@gmail.com>
@github-actions github-actions bot disabled auto-merge December 11, 2024 13:31
@sven1977 sven1977 enabled auto-merge (squash) December 11, 2024 13:45
Signed-off-by: sven1977 <svenmika1977@gmail.com>
@github-actions github-actions bot disabled auto-merge December 11, 2024 14:44
@sven1977 sven1977 enabled auto-merge (squash) December 11, 2024 16:27
@sven1977 sven1977 merged commit f98ce02 into ray-project:master Dec 11, 2024
6 checks passed
@sven1977 sven1977 deleted the cleanup_examples_folder_31_hierarchical_training branch December 11, 2024 18:27
simonsays1980 pushed a commit to simonsays1980/ray that referenced this pull request Dec 12, 2024
ujjawal-khare pushed a commit to ujjawal-khare-27/ray that referenced this pull request Dec 17, 2024
…cal training example script. (ray-project#49127)

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-docs-or-examples Issues related to RLlib documentation or rllib/examples rllib-env rllib env related issues rllib-newstack rllib-oldstack-cleanup Issues related to cleaning up classes, utilities on the old API stack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants