class_docstr: Test RLModule loading from rl module spec across a multi node cluster.
class_docstr_tok: ["Test","RLModule","loading","from","rl","module","spec","across","a","multi","node","cluster","."]
code: def get_ppo_config(num_agents=NUM_AGENTS):
      def policy_mapping_fn(agent_id, episode, worker, **kwargs):
          # policy_id is policy_i where i is the agent id
          pol_id = f"policy_{agent_id}"
          return pol_id
  
      scaling_config = {
          "num_learner_workers": 2,
          "num_gpus_per_learner_worker": 1,
      }
  
      policies = {f"policy_{i}" for i in range(num_agents)}
  
      config = (
          PPOConfig()
          .rollouts(rollout_fragment_length=4)
          .environment(
              MultiAgentCartPole, env_config={"num_agents": num_agents}
          )
          .training(
              num_sgd_iter=1, train_batch_size=8, sgd_minibatch_size=8
          )
          .multi_agent(
              policies=policies, policy_mapping_fn=policy_mapping_fn
          )
          .training(_enable_learner_api=True)
          .resources(**scaling_config)
      )
      return config
  
imports: import gymnasium
  import numpy
  import shutil
  import tempfile
  import tree
  import unittest
  import ray
  from ray.rllib.algorithms.ppo import PPOConfig
  from ray.rllib.algorithms.ppo.ppo_catalog import PPOCatalog
  from ray.rllib.algorithms.ppo.tf.ppo_tf_rl_module import PPOTfRLModule
  from ray.rllib.algorithms.ppo.torch.ppo_torch_rl_module import PPOTorchRLModule
  from ray.rllib.core.rl_module.rl_module import SingleAgentRLModuleSpec
  from ray.rllib.core.rl_module.marl_module import MultiAgentRLModuleSpec, MultiAgentRLModule
  from ray.rllib.examples.env.multi_agent import MultiAgentCartPole
  from ray.rllib.policy.sample_batch import DEFAULT_POLICY_ID
  from ray.rllib.utils.test_utils import check, framework_iterator
  from ray.rllib.utils.numpy import convert_to_numpy
label_desc: Use image node_id 3 for calling the TestE2ERLModuleLoad obj's underlying member method code with example usage: obj.get_ppo_config(num_agents) and returns: config, pol_id