def test_run_fcent_td3(self): # Run the script; verify it executes without failure. args = parse_train_options( '', '', args=[ "MountainCarContinuous-v0", "--initial_exploration_steps", "1", "--total_steps", "500", "--log_interval", "500", "--num_envs", "2", # to test RaySampler "--nb_rollout_steps", "2", ], multiagent=False, hierarchical=False, ) run_fcnet(args, 'data/fcnet') # Check that the folders were generated. self.assertTrue( os.path.isdir( os.path.join(os.getcwd(), "data/fcnet/MountainCarContinuous-v0"))) # Clear anything that was generated. ray.shutdown() shutil.rmtree(os.path.join(os.getcwd(), "data"))
def test_run_fcent_td3(self): # Run the script; verify it executes without failure. args = parse_options('', '', args=["MountainCarContinuous-v0", "--n_cpus", "1", "--total_steps", "2000"]) run_fcnet(args, 'data/fcnet') # Check that the folders were generated. self.assertTrue(os.path.isdir( os.path.join(os.getcwd(), "data/fcnet/MountainCarContinuous-v0"))) # Clear anything that was generated. shutil.rmtree(os.path.join(os.getcwd(), "data"))
def test_run_fcent_sac(self): # Run the script; verify it executes without failure. args = parse_train_options('', '', args=[ "MountainCarContinuous-v0", "--initial_exploration_steps", "1", "--total_steps", "500", "--log_interval", "500", "--alg", "SAC" ]) run_fcnet(args, 'data/fcnet') # Check that the folders were generated. self.assertTrue( os.path.isdir( os.path.join(os.getcwd(), "data/fcnet/MountainCarContinuous-v0"))) # Clear anything that was generated. shutil.rmtree(os.path.join(os.getcwd(), "data"))