class_docstr: Defines a configuration class from which a CQL can be built.
  
  .. testcode::
      :skipif: True
  
      from ray.rllib.algorithms.cql import CQLConfig
      config = CQLConfig().training(gamma=0.9, lr=0.01)
      config = config.resources(num_gpus=0)
      config = config.rollouts(num_rollout_workers=4)
      print(config.to_dict())
      # Build a Algorithm object from the config and run 1 training iteration.
      algo = config.build(env="CartPole-v1")
      algo.train()
class_docstr_tok: ["Defines","a","configuration","class","from","which","a","CQL","can","be","built",".","..","testcode",":",":",":","skipif",":","True","from","ray.rllib.algorithms.cql","import","CQLConfig","config","=","CQLConfig","(",")",".training","(","gamma=0.9",",","lr=0.01",")","config","=","config.resources","(","num_gpus=0",")","config","=","config.rollouts","(","num_rollout_workers=4",")","print","(","config.to_dict","(",")",")","#","Build","a","Algorithm","object","from","the","config","and","run","1","training","iteration",".","algo","=","config.build","(","env=","''","CartPole-v1","''",")","algo.train","(",")"]
docstr: Sets the training-related configuration.
  
  Args:
      bc_iters: Number of iterations with Behavior Cloning pretraining.
      temperature: CQL loss temperature.
      num_actions: Number of actions to sample for CQL loss
      lagrangian: Whether to use the Lagrangian for Alpha Prime (in CQL loss).
      lagrangian_thresh: Lagrangian threshold.
      min_q_weight: in Q weight multiplier.
  
  Returns:
      This updated AlgorithmConfig object.
docstr_tok: ["Sets","the","training-related","configuration",".","Args",":","bc_iters",":","Number","of","iterations","with","Behavior","Cloning","pretraining",".","temperature",":","CQL","loss","temperature",".","num_actions",":","Number","of","actions","to","sample","for","CQL","loss","lagrangian",":","Whether","to","use","the","Lagrangian","for","Alpha","Prime","(","in","CQL","loss",")",".","lagrangian_thresh",":","Lagrangian","threshold",".","min_q_weight",":","in","Q","weight","multiplier",".","Returns",":","This","updated","AlgorithmConfig","object","."]
code: def training(
      self,
      *,
      bc_iters: Optional[int] = NotProvided,
      temperature: Optional[float] = NotProvided,
      num_actions: Optional[int] = NotProvided,
      lagrangian: Optional[bool] = NotProvided,
      lagrangian_thresh: Optional[float] = NotProvided,
      min_q_weight: Optional[float] = NotProvided,
      **kwargs,
  ) -> "CQLConfig":
      """Sets the training-related configuration.
  
      Args:
          bc_iters: Number of iterations with Behavior Cloning pretraining.
          temperature: CQL loss temperature.
          num_actions: Number of actions to sample for CQL loss
          lagrangian: Whether to use the Lagrangian for Alpha Prime (in CQL loss).
          lagrangian_thresh: Lagrangian threshold.
          min_q_weight: in Q weight multiplier.
  
      Returns:
          This updated AlgorithmConfig object.
      """
      # Pass kwargs onto super's `training()` method.
      super().training(**kwargs)
  
      if bc_iters is not NotProvided:
          self.bc_iters = bc_iters
      if temperature is not NotProvided:
          self.temperature = temperature
      if num_actions is not NotProvided:
          self.num_actions = num_actions
      if lagrangian is not NotProvided:
          self.lagrangian = lagrangian
      if lagrangian_thresh is not NotProvided:
          self.lagrangian_thresh = lagrangian_thresh
      if min_q_weight is not NotProvided:
          self.min_q_weight = min_q_weight
  
      return self
  
imports: import logging
  from typing import Optional, Type
  from ray.rllib.algorithms.algorithm_config import AlgorithmConfig, NotProvided
  from ray.rllib.algorithms.cql.cql_tf_policy import CQLTFPolicy
  from ray.rllib.algorithms.cql.cql_torch_policy import CQLTorchPolicy
  from ray.rllib.algorithms.sac.sac import SAC, SACConfig
  from ray.rllib.execution.rollout_ops import synchronous_parallel_sample
  from ray.rllib.execution.train_ops import multi_gpu_train_one_step, 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, deprecation_warning
  from ray.rllib.utils.framework import try_import_tf, try_import_tfp
  from ray.rllib.utils.metrics import LAST_TARGET_UPDATE_TS, NUM_AGENT_STEPS_SAMPLED, NUM_AGENT_STEPS_TRAINED, NUM_ENV_STEPS_SAMPLED, NUM_ENV_STEPS_TRAINED, NUM_TARGET_UPDATES, TARGET_NET_UPDATE_TIMER, SYNCH_WORKER_WEIGHTS_TIMER, SAMPLE_TIMER
  from ray.rllib.utils.typing import ResultDict
label_desc: Use image node_id 2 for calling the CQLConfig obj's underlying member method code with example usage: obj.training() and returns: self