Skip to content

Conversation

@bveeramani
Copy link
Member

Why are these changes needed?

These changes are needed for two reasons.

__grouping_doc_end__ is in the wrong place
If you look at the part of the Ray documentation where the tag is referenced, you'll read

You can use the MultiAgentEnv.with_agent_groups() method to define these groups:

However, if you look at the code snippet below, you'll see the implementation of to_base_env in addition to the implementation of with_agent_groups.

To remove to_base_env from the code snippet, we need to move __grouping_doc__end__.

Black cannot format multi_agent_env.py
For some reason, Black errors while formatting multi_agent_env.py. However, if we move __grouping_doc_end__ up, the issue is resolved.

Related issue number

Closes #21314. Also see #21311.

Checks

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

@pcmoritz
Copy link
Contributor

pcmoritz commented Jan 2, 2022

Thanks, this looks great! I also checked that it indeed fixes the documentation :)

@pcmoritz pcmoritz merged commit c263008 into ray-project:master Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] [RLlib] Prevent Black from erroring while formatting multi_agent_env.py

4 participants