class_docstr: Defines a configuration class from which a PPO Algorithm can be built.
  
  .. testcode::
  
      from ray.rllib.algorithms.ppo import PPOConfig
      config = PPOConfig()
      config = config.training(gamma=0.9, lr=0.01, kl_coeff=0.3,
          train_batch_size=128)
      config = config.resources(num_gpus=0)
      config = config.rollouts(num_rollout_workers=1)
  
      # Build a Algorithm object from the config and run 1 training iteration.
      algo = config.build(env="CartPole-v1")
      algo.train()
  
  .. testcode::
  
      from ray.rllib.algorithms.ppo import PPOConfig
      from ray import air
      from ray import tune
      config = PPOConfig()
      # Print out some default values.
  
      # Update the config object.
      config.training(
          lr=tune.grid_search([0.001 ]), clip_param=0.2
      )
      # Set the config object's env.
      config = config.environment(env="CartPole-v1")
  
      # Use to_dict() to get the old-style python config dict
      # when running with tune.
      tune.Tuner(
          "PPO",
          run_config=air.RunConfig(stop={"training_iteration": 1}),
          param_space=config.to_dict(),
      ).fit()
  
  .. testoutput::
      :hide:
  
      ...
class_docstr_tok: ["Defines","a","configuration","class","from","which","a","PPO","Algorithm","can","be","built",".","..","testcode",":",":","from","ray.rllib.algorithms.ppo","import","PPOConfig","config","=","PPOConfig","(",")","config","=","config.training","(","gamma=0.9",",","lr=0.01",",","kl_coeff=0.3",",","train_batch_size=128",")","config","=","config.resources","(","num_gpus=0",")","config","=","config.rollouts","(","num_rollout_workers=1",")","#","Build","a","Algorithm","object","from","the","config","and","run","1","training","iteration",".","algo","=","config.build","(","env=","''","CartPole-v1","''",")","algo.train","(",")","..","testcode",":",":","from","ray.rllib.algorithms.ppo","import","PPOConfig","from","ray","import","air","from","ray","import","tune","config","=","PPOConfig","(",")","#","Print","out","some","default","values",".","#","Update","the","config","object",".","config.training","(","lr=tune.grid_search","(","[","0.001","]",")",",","clip_param=0.2",")","#","Set","the","config","object","'s","env",".","config","=","config.environment","(","env=","''","CartPole-v1","''",")","#","Use","to_dict","(",")","to","get","the","old-style","python","config","dict","#","when","running","with","tune",".","tune.Tuner","(","``","PPO","''",",","run_config=air.RunConfig","(","stop=","{","``","training_iteration","''",":","1","}",")",",","param_space=config.to_dict","(",")",",",")",".fit","(",")","..","testoutput",":",":",":","hide",":","..."]
code: def get_default_rl_module_spec(self) -> SingleAgentRLModuleSpec:
      from ray.rllib.algorithms.ppo.ppo_catalog import PPOCatalog
  
      if self.framework_str == "torch":
          from ray.rllib.algorithms.ppo.torch.ppo_torch_rl_module import (
              PPOTorchRLModule,
          )
  
          return SingleAgentRLModuleSpec(
              module_class=PPOTorchRLModule, catalog_class=PPOCatalog
          )
      elif self.framework_str == "tf2":
          from ray.rllib.algorithms.ppo.tf.ppo_tf_rl_module import (
              PPOTfRLModule,
          )
  
          return SingleAgentRLModuleSpec(
              module_class=PPOTfRLModule, catalog_class=PPOCatalog
          )
      else:
          raise ValueError(
              f"The framework {self.framework_str} is not supported. "
              "Use either 'torch' or 'tf2'."
          )
  
imports: import logging
  from typing import List, Optional, Type, Union, TYPE_CHECKING
  import numpy
  import tree
  from ray.rllib.algorithms.algorithm import Algorithm
  from ray.rllib.algorithms.algorithm_config import AlgorithmConfig, NotProvided
  from ray.rllib.core.rl_module.rl_module import SingleAgentRLModuleSpec
  from ray.rllib.evaluation.postprocessing_v2 import postprocess_episodes_to_sample_batch
  from ray.rllib.evaluation.rollout_worker import RolloutWorker
  from ray.rllib.execution.rollout_ops import standardize_fields, synchronous_parallel_sample
  from ray.rllib.execution.train_ops import train_one_step, multi_gpu_train_one_step
  from ray.rllib.policy.policy import Policy
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.deprecation import DEPRECATED_VALUE
  from ray.rllib.utils.metrics.learner_info import LEARNER_STATS_KEY
  from ray.rllib.utils.metrics import NUM_AGENT_STEPS_SAMPLED, NUM_ENV_STEPS_SAMPLED, SYNCH_WORKER_WEIGHTS_TIMER, SAMPLE_TIMER, ALL_MODULES
  from ray.rllib.env.single_agent_episode import SingleAgentEpisode
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.utils.schedules.scheduler import Scheduler
  from ray.rllib.utils.typing import ResultDict
  from ray.util.debug import log_once
label_desc: Use image node_id 2 for calling the PPOConfig obj's underlying member method code with example usage: obj.get_default_rl_module_spec() and returns: SingleAgentRLModuleSpec, SingleAgentRLModuleSpec