Skip to content

Commit

Permalink
Removed the redundant weight syncronization via torch seed
Browse files Browse the repository at this point in the history
  • Loading branch information
realAsma committed Jan 23, 2025
1 parent e757c8d commit 3456c05
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cleanrl/ppo_atari_multigpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def unwrap_ddp(model) -> Agent:
args.seed += local_rank
random.seed(args.seed)
np.random.seed(args.seed)
torch.manual_seed(args.seed - local_rank)
torch.manual_seed(args.seed)
torch.backends.cudnn.deterministic = args.torch_deterministic

if len(args.device_ids) > 0:
Expand All @@ -235,7 +235,6 @@ def unwrap_ddp(model) -> Agent:
agent = Agent(envs).to(device)
if args.world_size > 1:
agent = DDP(agent)
torch.manual_seed(args.seed)
optimizer = optim.Adam(agent.parameters(), lr=args.learning_rate, eps=1e-5)

# ALGO Logic: Storage setup
Expand Down

0 comments on commit 3456c05

Please sign in to comment.