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] [Connectors] Fix test returning model based rollouts data connectors #30308

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions rllib/env/tests/test_multi_agent_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,8 @@ def is_recurrent(self):
self.assertEqual(batch["state_out_0"][i], h)

def test_returning_model_based_rollouts_data(self):
# TODO(avnishn): This test only works with the old api

class ModelBasedPolicy(DQNTFPolicy):
def compute_actions_from_input_dict(
self, input_dict, explore=None, timestep=None, episodes=None, **kwargs
Expand Down Expand Up @@ -416,6 +418,7 @@ def compute_actions_from_input_dict(
.rollouts(
rollout_fragment_length=5,
num_rollout_workers=0,
enable_connectors=False, # only works with old episode API
)
.multi_agent(
policies={"p0", "p1"},
Expand Down