-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
SageMaker @remote function: Added multi-node functionality #4984
Conversation
@@ -91,7 +91,7 @@ def remote( | |||
use_spot_instances=False, | |||
max_wait_time_in_seconds=None, | |||
use_torchrun=False, | |||
nproc_per_node=1, | |||
nproc_per_node: Optional[int] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does nproc
stand for ? Can we use the unabbreviated string for the parameter ?
except OSError: | ||
logger.info("No Neurons detected (normal if no neurons installed)") | ||
return 0 | ||
except subprocess.CalledProcessError as e: | ||
if e.output is not None: | ||
try: | ||
msg = e.output.decode("utf-8").partition("error=")[2] | ||
logger.info( | ||
"No Neurons detected (normal if no neurons installed). \ | ||
If neuron installed then %s", | ||
msg, | ||
) | ||
except AttributeError: | ||
logger.info("No Neurons detected (normal if no neurons installed)") | ||
else: | ||
logger.info("No Neurons detected (normal if no neurons installed)") | ||
|
||
return 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add unit tests for these ?
Or this file in general in a separate test file ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added 3 unit tests for the environment bootstrap:
- single instance with CPU
- single instance with multi GPUs
- multiple instances with multi GPUs
Issue #, if available:
Description of changes: Added the possibility to execute distributed SageMaker Training jobs across multiple nodes (multiple instances), by loading distributed environment variables
Testing done: Unit tests for remote_function, added 2 additional unit tests for single node and multi-node
Merge Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
unique_name_from_base
to create resource names in integ tests (if appropriate)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.