-
Notifications
You must be signed in to change notification settings - Fork 50
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
[REFACTOR] train.py to consolidate common logic for both single GPU and multi GPU training (#913) #944
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
emailweixu
reviewed
Jul 23, 2021
breakds
force-pushed
the
PR_distributed_train_py
branch
from
July 24, 2021 00:39
c6b3954
to
0ceb0cc
Compare
hnyu
requested changes
Jul 24, 2021
All comments resolved. PTAL. |
hnyu
reviewed
Jul 25, 2021
breakds
force-pushed
the
PR_distributed_train_py
branch
from
July 26, 2021 21:15
72418e7
to
273810b
Compare
emailweixu
approved these changes
Jul 26, 2021
hnyu
approved these changes
Jul 26, 2021
pd-perry
pushed a commit
to pd-perry/alf
that referenced
this pull request
Dec 11, 2021
…nd multi GPU training (HorizonRobotics#913) (HorizonRobotics#944) * [REFACTOR] train.py to consolidate common logic for both single GPU and multi GPU training * Address Wei's comments * Address Haonan's comments * Specify authoritative url and port as well * Remove unused Optional typing
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The effort of #913 requires updating the entry point script
alf/bin/train.py
. Such updates will rearrange some of the code logic in order to minimize code duplication. I think it is a good practice to split the work and submit the refactor earlier so that the work is done in a more incremental fashion, with the benefits oftrain.py
, the risk of resolving conflicts increases. Submitting this PR first will minimize such risk.How is it refactored?
--distributed
which takes enum value. Themulti-gpu
is currently disabled explicitly.train_eval
intotraining_worker
so that it does the training/evaluation job as a single procemulti-gpu
mode is just about running several processes viamultiprocessing
, while each process just runstrain_eval_worker
.How is it tested?
multi-gpu
is specified in--distributed
, it prompts to tell the user that DDP is currently unavailable--distributed
(i.e. the same as before), it runsac_breakout
successfully and the score hits 50 in 4k training steps.