aws / sagemaker-training-toolkit

Train machine learning models within a 🐳 Docker container using 🧠 Amazon SageMaker.
Apache License 2.0
496 stars 118 forks source link

feature: add python module entrypoint type, add python module support to torch_distributed #205

Closed clumsy closed 8 months ago

clumsy commented 11 months ago

Issue #, if available:

Related to https://github.com/aws/sagemaker-python-sdk/pull/4324

Description of changes: torchrun can run modules via -m <MODULE but SageMaker runtime does not yet support this entrypoint type. Adding a new entrypoint type and add support to torch_distributed.

Testing done:

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

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

clumsy commented 11 months ago

Hi @rahul003, I was able to confirm this fix works by building and using a custom Docker image, I see:

Invoking script with the following command:
torchrun --nnodes 1 --nproc_per_node 1 -m <MY_MODULE> <MY_ARGS>
rahul003 commented 10 months ago

LGTM

clumsy commented 9 months ago

@rahul003 Is there anything I can do help merging this PR?

rahul003 commented 9 months ago

Hi Alexander, The PR looks good to me, but I don’t have the authority to merge PRs here. We have to check with maintainers

Rahul Huilgol

On Wed, Jan 24, 2024 at 11:12 AM Alexander Jipa @.***> wrote:

@rahul003 https://github.com/rahul003 Is there anything I can do help merging this PR?

— Reply to this email directly, view it on GitHub https://github.com/aws/sagemaker-training-toolkit/pull/205#issuecomment-1908758617, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2MBWHNJLAONELYXTF6PK3YQFMIFAVCNFSM6AAAAABAVF642GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBYG42TQNRRG4 . You are receiving this because you were mentioned.Message ID: @.***>

clumsy commented 8 months ago

Closing this one and open a new PR.