diff --git a/closed_loop_AFC/jet_cylinder/ppo_controller.py b/closed_loop_AFC/jet_cylinder/ppo_controller.py index 62dc737..b09e12f 100644 --- a/closed_loop_AFC/jet_cylinder/ppo_controller.py +++ b/closed_loop_AFC/jet_cylinder/ppo_controller.py @@ -385,9 +385,11 @@ def parse_args(): logger.error("wandb is not installed, run `pip install gymprecice[vis]`") raise err - # TRY NOT TO MODIFY: seeding + # deterministic training random.seed(args.seed) np.random.seed(args.seed) + torch.manual_seed(args.seed) + torch.backends.cudnn.deterministic = args.torch_deterministic def make_env(options, idx, wrappers=None): def _make_env(): diff --git a/closed_loop_AFC/rotating_cylinder/ppo_controller.py b/closed_loop_AFC/rotating_cylinder/ppo_controller.py index 5ef00e0..4a9dc3c 100644 --- a/closed_loop_AFC/rotating_cylinder/ppo_controller.py +++ b/closed_loop_AFC/rotating_cylinder/ppo_controller.py @@ -390,9 +390,11 @@ def parse_args(): logger.error("wandb is not installed, run `pip install gymprecice[vis]`") raise err - # TRY NOT TO MODIFY: seeding + # deterministic training random.seed(args.seed) np.random.seed(args.seed) + torch.manual_seed(args.seed) + torch.backends.cudnn.deterministic = args.torch_deterministic def make_env(options, idx, wrappers=None): def _make_env():