class_docstr: Defines a configuration class from which a LeelaChessZero Algorithm can be built.
  
  Example:
      >>> from ray.rllib.algorithms.leela_chess_zero as lc0 # doctest: +SKIP
      >>> from lc0 import LeelaChessZeroConfig # doctest: +SKIP
      >>> config = LeelaChessZeroConfig()   # doctest: +SKIP
      >>> config = config.training(sgd_minibatch_size=256)   # doctest: +SKIP
      >>> config = config..resources(num_gpus=0)   # doctest: +SKIP
      >>> config = config..rollouts(num_rollout_workers=4)   # doctest: +SKIP
      >>> print(config.to_dict()) # doctest: +SKIP
      >>> # Build a Algorithm object from the config and run 1 training iteration.
      >>> algo = config.build(env="CartPole-v1")  # doctest: +SKIP
      >>> algo.train() # doctest: +SKIP
  
  Example:
      >>> from ray.rllib.algorithms.leela_chess_zero as lc0 # doctest: +SKIP
      >>> from lc0 import LeelaChessZeroConfig # doctest: +SKIP
      >>> from ray import air # doctest: +SKIP
      >>> from ray import tune # doctest: +SKIP
      >>> config = LeelaChessZeroConfig() # doctest: +SKIP
      >>> # Print out some default values.
      >>> print(config.shuffle_sequences) # doctest: +SKIP
      >>> # Update the config object.
      >>> config.training(lr=tune.grid_search([0.001, 0.0001]))  # doctest: +SKIP
      >>> # Set the config object's env.
      >>> 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
      ...     "LeelaChessZero", # doctest: +SKIP
      ...     run_config=air.RunConfig(stop={ # doctest: +SKIP
                  "episode_reward_mean": 200}), # doctest: +SKIP
      ...     param_space=config.to_dict(), # doctest: +SKIP
      ... ).fit() # doctest: +SKIP
class_docstr_tok: ["Defines","a","configuration","class","from","which","a","LeelaChessZero","Algorithm","can","be","built",".","Example",":",">",">",">","from","ray.rllib.algorithms.leela_chess_zero","as","lc0","#","doctest",":","+SKIP",">",">",">","from","lc0","import","LeelaChessZeroConfig","#","doctest",":","+SKIP",">",">",">","config","=","LeelaChessZeroConfig","(",")","#","doctest",":","+SKIP",">",">",">","config","=","config.training","(","sgd_minibatch_size=256",")","#","doctest",":","+SKIP",">",">",">","config","=","config","..","resources","(","num_gpus=0",")","#","doctest",":","+SKIP",">",">",">","config","=","config","..","rollouts","(","num_rollout_workers=4",")","#","doctest",":","+SKIP",">",">",">","print","(","config.to_dict","(",")",")","#","doctest",":","+SKIP",">",">",">","#","Build","a","Algorithm","object","from","the","config","and","run","1","training","iteration",".",">",">",">","algo","=","config.build","(","env=","''","CartPole-v1","''",")","#","doctest",":","+SKIP",">",">",">","algo.train","(",")","#","doctest",":","+SKIP","Example",":",">",">",">","from","ray.rllib.algorithms.leela_chess_zero","as","lc0","#","doctest",":","+SKIP",">",">",">","from","lc0","import","LeelaChessZeroConfig","#","doctest",":","+SKIP",">",">",">","from","ray","import","air","#","doctest",":","+SKIP",">",">",">","from","ray","import","tune","#","doctest",":","+SKIP",">",">",">","config","=","LeelaChessZeroConfig","(",")","#","doctest",":","+SKIP",">",">",">","#","Print","out","some","default","values",".",">",">",">","print","(","config.shuffle_sequences",")","#","doctest",":","+SKIP",">",">",">","#","Update","the","config","object",".",">",">",">","config.training","(","lr=tune.grid_search","(","[","0.001",",","0.0001","]",")",")","#","doctest",":","+SKIP",">",">",">","#","Set","the","config","object","'s","env",".",">",">",">","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","...","``","LeelaChessZero","''",",","#","doctest",":","+SKIP","...","run_config=air.RunConfig","(","stop=","{","#","doctest",":","+SKIP","``","episode_reward_mean","''",":","200","}",")",",","#","doctest",":","+SKIP","...","param_space=config.to_dict","(",")",",","#","doctest",":","+SKIP","...",")",".fit","(",")","#","doctest",":","+SKIP"]
code: def callbacks(
      self,
      *,
      callbacks_class: Optional[DefaultCallbacks] = NotProvided,
      **kwargs,
  ) -> "LeelaChessZeroConfig":
      super().callbacks(callbacks_class, **kwargs)
  
      if callbacks_class is not NotProvided:
          self.callbacks_class = callbacks_class
      return self
  
imports: import logging
  from typing import List, Optional, Type, Union
  from rllib_leela_chess_zero.leela_chess_zero.leela_chess_zero_model import LeelaChessZeroModel
  from rllib_leela_chess_zero.leela_chess_zero.leela_chess_zero_policy import LeelaChessZeroPolicy
  from rllib_leela_chess_zero.leela_chess_zero.mcts import MCTS
  from ray.rllib.algorithms.algorithm import Algorithm
  from ray.rllib.algorithms.algorithm_config import AlgorithmConfig, NotProvided
  from ray.rllib.algorithms.callbacks import DefaultCallbacks
  from ray.rllib.execution.rollout_ops import synchronous_parallel_sample
  from ray.rllib.execution.train_ops import train_one_step
  from ray.rllib.models.catalog import ModelCatalog
  from ray.rllib.models.modelv2 import restore_original_dimensions
  from ray.rllib.models.torch.torch_action_dist import TorchCategorical
  from ray.rllib.policy.policy import Policy
  from ray.rllib.policy.sample_batch import concat_samples
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.deprecation import DEPRECATED_VALUE
  from ray.rllib.utils.framework import try_import_torch
  from ray.rllib.utils.metrics import NUM_AGENT_STEPS_SAMPLED, NUM_ENV_STEPS_SAMPLED, SYNCH_WORKER_WEIGHTS_TIMER
  from ray.rllib.utils.replay_buffers import PrioritizedReplayBuffer
  from ray.rllib.utils.replay_buffers.utils import validate_buffer_config
  from ray.rllib.utils.typing import ResultDict
label_desc: Use image node_id 2 for calling the LeelaChessZeroConfig obj's underlying member method code with example usage: obj.callbacks() and returns: self