Example code failed---multi_agent_two_trainers.py

  • High: It blocks me to complete my task.
  1. When attempting to run the example script multi_agent_two_trainers.py from ray/rllib/examples, I encountered a TypeError indicating an unexpected keyword argument _enable_new_api_stack in the AlgorithmConfig.experimental() method.

  2. After commenting out the line involving _enable_new_api_stack=False, I encountered another error during the execution, related to a mismatch in the state dictionary keys when trying to load weights for the FullyConnectedNetwork_as_DQNTorchModel, suggesting missing keys and unexpected keys in the state dict.

part modified in original file

ppo_config = (
    PPOConfig()
    # .experimental(_enable_new_api_stack=False)  ### First try without change
    # .experimental(  )  ### Second try without param setting inside

source code

Versions / Dependencies

Name: torch
Version: 2.1.0

Name: ray
Version: 2.7.1

Python 3.11.4