class_docstr: Tests ModelV2 classes and their modularization capabilities.
class_docstr_tok: ["Tests","ModelV2","classes","and","their","modularization","capabilities","."]
code: def test_modelv3(self):
      config = (
          ppo.PPOConfig()
          .environment("CartPole-v1")
          .framework("tf")
          .rollouts(num_rollout_workers=0)
          .training(
              model={
                  "custom_model": RNNModel,
                  "custom_model_config": {
                      "hiddens_size": 64,
                      "cell_size": 128,
                  },
              }
          )
      )
      algo = config.build()
      for _ in range(2):
          results = algo.train()
          print(results)
      algo.stop()
  
file_path: ray/rllib/models/tests/test_models.py
imports: from gymnasium.spaces import Box
  import numpy
  import unittest
  import ray
  import ray.rllib.algorithms.ppo
  from ray.rllib.examples.models.modelv3 import RNNModel
  from ray.rllib.models.tf.tf_modelv2 import TFModelV2
  from ray.rllib.models.tf.fcnet import FullyConnectedNetwork
  from ray.rllib.utils.framework import try_import_tf
label_desc: Use image node_id 4 for calling the TestModels obj's underlying member method code with example usage: obj.test_modelv3() without return types