Skip to content

[RLlib] Multi-agent test and support envs that sometimes return empty obs-dicts (no agent requesting an action).#30413

Merged
sven1977 merged 10 commits intoray-project:masterfrom
sven1977:multi_agent_support_zero_agents_in_obs_dict
Nov 18, 2022
Merged

[RLlib] Multi-agent test and support envs that sometimes return empty obs-dicts (no agent requesting an action).#30413
sven1977 merged 10 commits intoray-project:masterfrom
sven1977:multi_agent_support_zero_agents_in_obs_dict

Conversation

@sven1977
Copy link
Copy Markdown
Contributor

@sven1977 sven1977 commented Nov 17, 2022

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

Multi-agent test and support envs that sometimes return empty obs-dicts (no agent requesting an action).

  • This has already worked when not using connectors (config.rollouts(enable_connectors=False)), but seems to break when connectors are enabled (hence we are using EpisodeV2, see bug below).
  • Fixes a EpisodeV2::has_init_obs() bug for when agent_id==0 (if-block should check is not None).
  • Also moves multi-agent pendulum learning test into proper location.

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 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>
Copy link
Copy Markdown
Member

@gjoliver gjoliver left a comment

Choose a reason for hiding this comment

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

nice test. we will try enable_connectors=True with this test merged.
thanks.

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 merged commit df76ac7 into ray-project:master Nov 18, 2022
WeichenXu123 pushed a commit to WeichenXu123/ray that referenced this pull request Dec 19, 2022
… obs-dicts (no agent requesting an action). (ray-project#30413)

Signed-off-by: Weichen Xu <weichen.xu@databricks.com>
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.

2 participants