class_docstr: Defines a configuration class from which a new A2C can be built.
  
  Example:
      >>> from ray import tune
      >>> from ray.rllib.algorithms.a2c import A2CConfig
      >>> config = A2CConfig()
      >>> config = config.training(lr=0.01, grad_clip=30.0)  # doctest: +SKIP
      >>> config = config.resources(num_gpus=0)  # doctest: +SKIP
      >>> config = config.rollouts(num_rollout_workers=2)  # doctest: +SKIP
      >>> config = config.environment("CartPole-v1")  # doctest: +SKIP
      >>> print(config.to_dict())  # doctest: +SKIP
      >>> # Build a Algorithm object from the config and run 1 training iteration.
      >>> algo = config.build()  # doctest: +SKIP
      >>> algo.train()  # doctest: +SKIP
  
  Example:
      >>> import ray.air as air
      >>> from ray import tune
      >>> from ray.rllib.algorithms.a2c import A2CConfig
      >>> config = A2CConfig()
      >>> # Print out some default values.
      >>> print(config.sample_async)   # doctest: +SKIP
      >>> # Update the config object.
      >>> config = config.training(lr=tune.grid_search(  # doctest: +SKIP
      ...     [0.001, 0.0001]), use_critic=False)
      >>> # Set the config object's env.
      >>> config = config.environment(env="CartPole-v1")  # doctest: +SKIP
      >>> # Use to_dict() to get the old-style python config dict
      >>> # when running with tune.
      >>> tune.Tuner(  # doctest: +SKIP
      ...     "A2C",
      ...     run_config=air.RunConfig(stop={"episode_reward_mean": 200}),
      ...     param_space=config.to_dict(),
      ... ).fit()
docstr: Sets the training related configuration.
  
  Args:
      microbatch_size: A2C supports microbatching, in which we accumulate
          gradients over batch of this size until the train batch size is reached.
          This allows training with batch sizes much larger than can fit in GPU
          memory. To enable, set this to a value less than the train batch size.
  
  Returns:
      This updated AlgorithmConfig object.
docstr_tok: ["Sets","the","training","related","configuration",".","Args",":","microbatch_size",":","A2C","supports","microbatching",",","in","which","we","accumulate","gradients","over","batch","of","this","size","until","the","train","batch","size","is","reached",".","This","allows","training","with","batch","sizes","much","larger","than","can","fit","in","GPU","memory",".","To","enable",",","set","this","to","a","value","less","than","the","train","batch","size",".","Returns",":","This","updated","AlgorithmConfig","object","."]
code: def training(
      self,
      *,
      microbatch_size: Optional[int] = NotProvided,
      **kwargs,
  ) -> "A2CConfig":
      """Sets the training related configuration.
  
      Args:
          microbatch_size: A2C supports microbatching, in which we accumulate
              gradients over batch of this size until the train batch size is reached.
              This allows training with batch sizes much larger than can fit in GPU
              memory. To enable, set this to a value less than the train batch size.
  
      Returns:
          This updated AlgorithmConfig object.
      """
      # Pass kwargs onto super's `training()` method.
      super().training(**kwargs)
  
      if microbatch_size is not NotProvided:
          self.microbatch_size = microbatch_size
  
      return self
  
imports: import logging
  import math
  from typing import Optional
  from ray.rllib.algorithms.a3c.a3c import A3C, A3CConfig
  from ray.rllib.algorithms.algorithm import Algorithm
  from ray.rllib.algorithms.algorithm_config import AlgorithmConfig, NotProvided
  from ray.rllib.execution.rollout_ops import synchronous_parallel_sample
  from ray.rllib.policy.sample_batch import DEFAULT_POLICY_ID
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.metrics import APPLY_GRADS_TIMER, COMPUTE_GRADS_TIMER, NUM_AGENT_STEPS_SAMPLED, NUM_AGENT_STEPS_TRAINED, NUM_ENV_STEPS_SAMPLED, NUM_ENV_STEPS_TRAINED, SAMPLE_TIMER, SYNCH_WORKER_WEIGHTS_TIMER
  from ray.rllib.utils.typing import ResultDict
label_desc: Use image node_id 2 for calling the A2CConfig obj's underlying member method code with example usage: obj.training() and returns: self