Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure the consistency of central_value_net with the same initial parameters before training starts in a multi-GPU setting. #297

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

annan-tang
Copy link
Contributor

Solution for Potential Issues with Multi-GPU/Node Training with Central Network Weights Initialization #296

@annan-tang annan-tang changed the title make sure the consistence of central_value_net with same initial params before training in multi-gpu setting make sure the consistence of central_value_net with same initial params before training start in the context of multi-gpu setting Jul 9, 2024
@annan-tang annan-tang changed the title make sure the consistence of central_value_net with same initial params before training start in the context of multi-gpu setting Ensure the consistency of central_value_net with the same initial parameters before training starts in a multi-GPU setting. Jul 9, 2024
@ViktorM
Copy link
Collaborator

ViktorM commented Jul 12, 2024

Hi @annan-tang,

Thank you for PR, I'll take a look tomorrow. Could you please update it to the latest master?

@annan-tang
Copy link
Contributor Author

annan-tang commented Jul 12, 2024

Hi @annan-tang,

Thank you for PR, I'll take a look tomorrow. Could you please update it to the latest master?

Thank you very much, I will update it later. And I'm doing experiments to show the effect. I will report more results later(within several days)

@annan-tang
Copy link
Contributor Author

Hi,

I conducted a comparison with and without the central value network initial parameters alignment code on a 2-GPU setting. I used the default Trifinger example in IsaacGymEnvs with the following command:

torchrun --standalone --nnodes=1 --nproc_per_node=2 train.py multi_gpu=True task=Trifinger headless=True seed={xxx}

For each situation, I tested five groups of random seeds ({xxx}) and found that there is not much difference with and without the initial parameters alignment. The reward curves are illustrated below:

central_value_net_alignment

Based on these results, it appears that the initial parameters alignment has little effect on the 2-GPU setting. However, I'm not sure if this would change when scaling up to dozens of GPUs.

@Denys88
Copy link
Owner

Denys88 commented Sep 11, 2024

merging it.

@Denys88 Denys88 merged commit 59d4c40 into Denys88:master Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants