-
Notifications
You must be signed in to change notification settings - Fork 1k
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
SageMaker DP Support #494
SageMaker DP Support #494
Conversation
The documentation is not available anymore as the PR was closed or merged. |
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.
Looking good at first glance! Let's focus on DataParallel only as AWS told us they were completely changing the API for model parallelism.
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.
Thanks for working on this! Let's also see what @philschmid thinks since he worked on the sagemaker command in Accelerate.
I will test this with my use case as soon as it gets merged into |
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.
LGTM! How should we maintain the SAGEMAKER_PYTHON_VERSION, SAGEMAKER_PYTORCH_VERSION, SAGEMAKER_TRANSFORMERS_VERSION
versions once we release new DLCs?
Hello, as it is not a frequent change, it can be done manually for time being whenever new releases of DLC happen. Any suggestions/best practices for automating it? |
Hello @pacman100, what is the sagemaker SDK estimator supposed to be used with accelerate? |
What does this PR do?
DATA_PARALLEL
support. Runaccelerate config
and answer the questions and chooseDATA_PARALLEL
for SageMaker Distribution Type. Sample config below withXXXXX
values being AWS account specific.base_job_name: accelerate-sagemaker-1 compute_environment: AMAZON_SAGEMAKER distributed_type: DATA_PARALLEL ec2_instance_type: ml.p3.16xlarge iam_role_name: XXXXX mixed_precision: fp16 num_machines: 1 profile: XXXXX py_version: py38 pytorch_version: 1.10.2 region: us-east-1 transformers_version: 4.17.0 use_cpu: false
After above config, just run the below command to run the official NLP example:
cd acceelerate/examples accelerate launch complete_nlp_example.py
The output logs: