class_docstr: Defines a configuration class from which a new BC Algorithm can be built
  
  .. testcode::
      :skipif: True
  
      from ray.rllib.algorithms.bc import BCConfig
      # Run this from the ray directory root.
      config = BCConfig().training(lr=0.00001, gamma=0.99)
      config = config.offline_data(
          input_="./rllib/tests/data/cartpole/large.json")
  
      # Build an Algorithm object from the config and run 1 training iteration.
      algo = config.build()
      algo.train()
  
  .. testcode::
      :skipif: True
  
      from ray.rllib.algorithms.bc import BCConfig
      from ray import tune
      config = BCConfig()
      # Print out some default values.
      print(config.beta)
      # Update the config object.
      config.training(
          lr=tune.grid_search([0.001, 0.0001]), beta=0.75
      )
      # Set the config object's data path.
      # Run this from the ray directory root.
      config.offline_data(
          input_="./rllib/tests/data/cartpole/large.json"
      )
      # Set the config object's env, used for evaluation.
      config.environment(env="CartPole-v1")
      # Use to_dict() to get the old-style python config dict
      # when running with tune.
      tune.Tuner(
          "BC",
          param_space=config.to_dict(),
      ).fit()
class_docstr_tok: ["Defines","a","configuration","class","from","which","a","new","BC","Algorithm","can","be","built","..","testcode",":",":",":","skipif",":","True","from","ray.rllib.algorithms.bc","import","BCConfig","#","Run","this","from","the","ray","directory","root",".","config","=","BCConfig","(",")",".training","(","lr=0.00001",",","gamma=0.99",")","config","=","config.offline_data","(","input_=","''",".\/rllib\/tests\/data\/cartpole\/large.json","''",")","#","Build","an","Algorithm","object","from","the","config","and","run","1","training","iteration",".","algo","=","config.build","(",")","algo.train","(",")","..","testcode",":",":",":","skipif",":","True","from","ray.rllib.algorithms.bc","import","BCConfig","from","ray","import","tune","config","=","BCConfig","(",")","#","Print","out","some","default","values",".","print","(","config.beta",")","#","Update","the","config","object",".","config.training","(","lr=tune.grid_search","(","[","0.001",",","0.0001","]",")",",","beta=0.75",")","#","Set","the","config","object","'s","data","path",".","#","Run","this","from","the","ray","directory","root",".","config.offline_data","(","input_=","''",".\/rllib\/tests\/data\/cartpole\/large.json","''",")","#","Set","the","config","object","'s","env",",","used","for","evaluation",".","config.environment","(","env=","''","CartPole-v1","''",")","#","Use","to_dict","(",")","to","get","the","old-style","python","config","dict","#","when","running","with","tune",".","tune.Tuner","(","``","BC","''",",","param_space=config.to_dict","(",")",",",")",".fit","(",")"]
code: def validate(self) -> None:
      # Call super's validation method.
      super().validate()
  
      if self.beta != 0.0:
          raise ValueError(
              "For behavioral cloning, `beta` parameter must be 0.0!"
          )
  
file_path: ray/rllib/algorithms/bc/bc.py
imports: from typing import Type, TYPE_CHECKING, Union
  from ray.rllib.algorithms.algorithm_config import AlgorithmConfig
  from ray.rllib.algorithms.bc.bc_catalog import BCCatalog
  from ray.rllib.algorithms.marwil.marwil import MARWIL, MARWILConfig
  from ray.rllib.core.rl_module.rl_module import SingleAgentRLModuleSpec
  from ray.rllib.execution.rollout_ops import synchronous_parallel_sample
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.metrics import ALL_MODULES, NUM_AGENT_STEPS_SAMPLED, NUM_ENV_STEPS_SAMPLED, SAMPLE_TIMER, SYNCH_WORKER_WEIGHTS_TIMER
  from ray.rllib.utils.typing import RLModuleSpec, ResultDict
label_desc: Use image node_id 4 for calling the BCConfig obj's underlying member method code with example usage: obj.validate() without return types