ray icon indicating copy to clipboard operation
ray copied to clipboard

[<Ray component: RLlib] enable_env_runner_and_connector_v2 NotImplementedError

Open timborden opened this issue 1 year ago • 0 comments

What happened + What you expected to happen

Using the new V2 API stack raises a NotImplementedError in BatchIndividualItems(ConnectorV2)

Versions / Dependencies

Google Colab, Python 3.10, Ray 2.22.0

Reproduction script

num_agents = 20
num_steps = 1024

algo = PPOConfig().framework("tf2").api_stack(
  enable_rl_module_and_learner = True,
  enable_env_runner_and_connector_v2 = True
).environment(
  CustomMultiAgentEnv,
  env_config = {
    "num_agents": num_agents,
    "num_steps": num_steps
  }
).multi_agent(
  policies = ["policy"],
  policy_mapping_fn = lambda *args, **kwargs: "my_policy",
  count_steps_by = "agent_steps"
).env_runners(
  num_env_runners = 0,
  sample_timeout_s = 60.0 * (num_steps / 4000),
  rollout_fragment_length = "auto"
).training(
  train_batch_size = int(num_steps * num_agents),
  sgd_minibatch_size = int(num_steps * num_agents / 4)
).checkpointing(
  export_native_model_files = True
).build().train()

Issue Severity

High: It blocks me from completing my task.

timborden avatar May 21 '24 12:05 timborden