Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
roywei committed Jun 20, 2022
1 parent 3ee8bff commit 96ab9c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,11 @@ def main():
help="Path for downloading " "the MNIST dataset",
)

dist.init_process_group(backend='smddp')
dist.init_process_group(backend="smddp")
args = parser.parse_args()
args.world_size = dist.get_world_size()
args.rank = rank = dist.get_rank()
args.local_rank = local_rank = int(os.getenv('LOCAL_RANK', -1))
args.local_rank = local_rank = int(os.getenv("LOCAL_RANK", -1))
args.lr = 1.0
args.batch_size //= args.world_size // 8
args.batch_size = max(args.batch_size, 1)
Expand All @@ -198,7 +198,7 @@ def main():
device = torch.device("cuda")

# select a single rank per node to download data
is_first_local_rank = (local_rank == 0)
is_first_local_rank = local_rank == 0
if is_first_local_rank:
train_dataset = datasets.MNIST(
data_path,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"\n",
"The following code cell defines `role` which is the IAM role ARN used to create and run SageMaker training and hosting jobs. This is the same IAM role used to create this SageMaker Notebook instance. \n",
"\n",
"`role` must have permission to create a SageMaker training job and launch an endpoint to host a model. For granular policies you can use to grant these permissions, see [Amazon SageMaker Roles](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html). If you do not require fine-tuned permissions for this demo, you can use the IAM managed policy **AmazonSageMakerFullAccess** to complete this demo."
"`role` must have permission to create a SageMaker training job and launch an endpoint to host a model. For granular policies you can use to grant these permissions, see [Amazon SageMaker Roles](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html). If you do not require fine-tuned permissions for this demo, you can use the IAM managed policy [AmazonSageMakerFullAccess](https://console.aws.amazon.com/iam/home?#/policies/arn:aws:iam::aws:policy/AmazonSageMakerFullAccess) to complete this demo."
]
},
{
Expand Down

0 comments on commit 96ab9c9

Please sign in to comment.