-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Added torchrun compatibility for distributet training across multiple GPUs in a single node (single instance) #4766
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
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
fdbf6ba
Added torchrun execution for remote jobs
brunopistone c253d0b
added integration tests
brunopistone 6815adb
docstring for use_torchrun and nproc_per_node
brunopistone 05b2c61
Merge branch 'master' into master
brunopistone f1b99a4
Merge branch 'master' into master
sage-maker fb3015f
Merge branch 'master' into master
sage-maker 73a1a62
Merge branch 'master' into master
sage-maker f6840d1
code formatting
brunopistone 60a421d
Merge branch 'master' of https://github.com/brunopistone/sagemaker-py…
brunopistone a61d042
added telemetry tracking
brunopistone e747737
indentation fixed
brunopistone 6fce4d6
Merge branch 'master' into master
sage-maker a508ebf
runned linter
brunopistone 020f29b
Merge branch 'master' of https://github.com/brunopistone/sagemaker-py…
brunopistone 634b8f6
fixed string length, sagemaker_remote/job.py
brunopistone ef92bcf
Merge branch 'master' into master
sage-maker 9681d91
Merge branch 'master' into master
sage-maker 7a31831
Merge branch 'master' into master
sage-maker 5ce1fbd
Merge branch 'master' into master
sage-maker fb38454
fixed test cases for remote function, run test cases for all sagemake…
1ad86dd
Merge branch 'master' of https://github.com/brunopistone/sagemaker-py…
brunopistone 97c172e
reduced length of docstring
brunopistone File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -818,3 +818,26 @@ def test_decorator_auto_capture(sagemaker_session, auto_capture_test_container): | |
f"--rm {auto_capture_test_container}" | ||
) | ||
subprocess.check_output(shlex.split(cmd), stderr=subprocess.STDOUT).decode("utf-8") | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and a new line here |
||
|
||
def test_decorator_torchrun( | ||
sagemaker_session, | ||
dummy_container_without_error, | ||
gpu_instance_type, | ||
use_torchrun=False, | ||
nproc_per_node=1, | ||
): | ||
@remote( | ||
role=ROLE, | ||
image_uri=dummy_container_without_error, | ||
instance_type=gpu_instance_type, | ||
sagemaker_session=sagemaker_session, | ||
keep_alive_period_in_seconds=60, | ||
use_torchrun=use_torchrun, | ||
nproc_per_node=nproc_per_node, | ||
) | ||
def divide(x, y): | ||
return x / y | ||
|
||
assert divide(10, 2) == 5 | ||
assert divide(20, 2) == 10 |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.