hunk.code_window:         ray.shutdown()
       def test_a3c(self):
           check_support(
               "A3C", {
                   "num_workers": 1,
                   "optimizer": {
                       "grads_per_step": 1
                   }
               },
               self.stats,
               check_bounds=True)
       def test_appo(self):
           check_support("APPO", {"num_gpus": 0, "vtrace": False}, self.stats)
           check_support(
               "APPO", {
  
hunk.labels: keep keep keep replace replace replace replace replace replace replace replace replace keep keep keep keep keep
hunk.after_edit:         config = {
               "num_workers": 1,
               "optimizer": {
                   "grads_per_step": 1
               }
           }
           check_support("A3C", config, self.stats, check_bounds=True)
           config["use_pytorch"] = True
           check_support("A3C", config, self.stats, check_bounds=True)
  
hunk.file_path: rllib/tests/test_supported_spaces.py
hunk.type: replace
file: import unittest
  
  from ray.rllib.agents.ppo import PPOTrainer, DEFAULT_CONFIG
  import ray
  
  
  class LocalModeTest(unittest.TestCase):
      def testLocal(self):
          ray.init(local_mode=True)
          cf = DEFAULT_CONFIG.copy()
          agent = PPOTrainer(cf, "CartPole-v0")
          print(agent.train())
  
  
  if __name__ == "__main__":
      unittest.main(verbosity=2)
  